fix movie backup saving path (was affected by PWD)
This commit is contained in:
parent
70d09673bc
commit
b3b41fb75f
|
@ -155,6 +155,8 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public string MoviesPathFragment => Global.Config.PathEntries["Global", "Movies"].Path;
|
||||
|
||||
public string MoviesBackupsPathFragment => Global.Config.PathEntries["Global", "Movie backups"].Path;
|
||||
|
||||
public string LuaPathFragment => Global.Config.PathEntries["Global", "Lua"].Path;
|
||||
|
||||
public string FirmwaresPathFragment => Global.Config.PathEntries["Global", "Firmware"].Path;
|
||||
|
|
|
@ -20,9 +20,10 @@ namespace BizHawk.Client.Common
|
|||
return;
|
||||
}
|
||||
|
||||
var backupDir = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesBackupsPathFragment, null);
|
||||
var backupName = Filename;
|
||||
backupName = backupName.Insert(Filename.LastIndexOf("."), $".{DateTime.Now:yyyy-MM-dd HH.mm.ss}");
|
||||
backupName = Path.Combine(Global.Config.PathEntries["Global", "Movie backups"].Path, Path.GetFileName(backupName));
|
||||
backupName = Path.Combine(backupDir, Path.GetFileName(backupName));
|
||||
|
||||
var directoryInfo = new FileInfo(backupName).Directory;
|
||||
if (directoryInfo != null)
|
||||
|
|
Loading…
Reference in New Issue