18 |
|
/// <param name="file"></param> |
19 |
|
static public bool backupFile(string file) |
20 |
|
{ |
21 |
< |
//try |
22 |
< |
//{ |
23 |
< |
// System.IO.File.Copy(file, file + ".bak", false); //make a backup first //false is to not override already created backups |
24 |
< |
//} |
25 |
< |
//catch (Exception e) |
26 |
< |
//{ |
27 |
< |
// Program.printAppError(Program.appErrors.BACKUPS_ALREADY_EXISTS, "Couldn't backup file " + file + " :\n" + e.Message); |
28 |
< |
// return false; |
29 |
< |
//} |
21 |
> |
try |
22 |
> |
{ |
23 |
> |
System.IO.File.Copy(file, file + ".bak", false); //make a backup first //false is to not override already created backups |
24 |
> |
} |
25 |
> |
catch (Exception e) |
26 |
> |
{ |
27 |
> |
Program.printAppError(Program.appErrors.BACKUPS_ALREADY_EXISTS, "Couldn't backup file " + file + " :\n" + e.Message); |
28 |
> |
return false; |
29 |
> |
} |
30 |
|
return true; |
31 |
|
} |
32 |
|
|