Commit 0ada5c66 authored by Yuanle Song's avatar Yuanle Song
Browse files

bugfix: create runtime dir before generating

mbackup.list file; create dir should use windows format dir string.
parent a00a1c3c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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