This commit is contained in:
2021-11-26 23:13:21 +00:00
parent 9d865a321f
commit 315f599b72

View File

@@ -64,6 +64,7 @@ namespace AyaNova.Util
//create path if doesn't exist already //create path if doesn't exist already
private static void EnsurePath(string path) private static void EnsurePath(string path)
{ {
Console.WriteLine($"FileUtil::EnsurePath path = [{path}]");
if (!Directory.Exists(path)) if (!Directory.Exists(path))
Directory.CreateDirectory(path); Directory.CreateDirectory(path);
} }
@@ -295,8 +296,8 @@ namespace AyaNova.Util
/// </summary> /// </summary>
internal static void EraseBackupFile(string name) internal static void EraseBackupFile(string name)
{ {
name=Path.GetFileName(name);//ensure no directory shenanigans, only a file name is allowed name = Path.GetFileName(name);//ensure no directory shenanigans, only a file name is allowed
//remove the file completely //remove the file completely
var DeleteFilePath = Path.Combine(BackupFilesFolder, name); var DeleteFilePath = Path.Combine(BackupFilesFolder, name);
if (File.Exists(DeleteFilePath)) if (File.Exists(DeleteFilePath))