This commit is contained in:
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user