From 0ada5c66f5683e77cba59a3edfd227703e133adf Mon Sep 17 00:00:00 2001 From: Yuanle Song Date: Fri, 15 Nov 2019 03:02:32 +0800 Subject: [PATCH] bugfix: create runtime dir before generating mbackup.list file; create dir should use windows format dir string. --- Program.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Program.fs b/Program.fs index 8830fc3..da0ef71 100644 --- a/Program.fs +++ b/Program.fs @@ -133,6 +133,7 @@ let generateMbackupList (logger: Logger) = // For mbackup-default.list and local.list, exclude empty lines and comment lines. // skip and give a warning on non-absolute path. // For user-default.list, auto prefix user's home dir, auto expand Documents, Downloads etc special folder. + Directory.CreateDirectory(runtimeDirWin) |> ignore File.WriteAllLines(mbackupList, allLines) logger.Info "mbackup.list file written: %s" mbackupList true @@ -216,8 +217,8 @@ let main argv = let rsyncArgs = rsyncCmd |> String.concat " " let rsyncExe = mbackupProgramDirWin + "rsync-w64\\usr\\bin\\rsync.exe" try - Directory.CreateDirectory(runtimeDir) |> ignore - Directory.CreateDirectory(userConfigDir) |> ignore + Directory.CreateDirectory(runtimeDirWin) |> ignore + Directory.CreateDirectory(userConfigDirWin) |> ignore logger.Info "Note: if you run the following rsync command yourself, make sure the generated file list (%s) is up-to-date.\n%s" mbackupFile (rsyncExe + " " + rsyncArgs) let proc = Process.Start(rsyncExe, rsyncArgs) if proc.WaitForExit Int32.MaxValue then -- GitLab