move backup()

This commit is contained in:
ac-stef
2015-02-08 17:39:15 +01:00
parent 348f640507
commit e369f3e415
3 changed files with 9 additions and 8 deletions
+8
View File
@@ -307,6 +307,14 @@ bool delfile(const char *path)
return !remove(path);
}
void backup(char *name, char *backupname)
{
string backupfile;
copystring(backupfile, findfile(backupname, "wb"));
remove(backupfile);
rename(findfile(name, "wb"), backupfile);
}
#ifndef STANDALONE
static int rwopsseek(SDL_RWops *rw, int offset, int whence)
{