Sync filesystem before unmounting backup device

This commit is contained in:
Tony George 2013-10-13 19:03:35 +05:30
parent 42ae712338
commit 8121cfa056

View File

@ -1943,6 +1943,11 @@ public class Main : GLib.Object{
log_msg(_("Unmounting device") + " '%s' ".printf(info.device) + _("from") + " '%s'".printf(info.mount_point));
//sync before unmount
cmd = "sync";
Process.spawn_command_line_sync(cmd, out std_out, out std_err, out ret_val);
//ignore success/failure
//unmount
cmd = "umount \"" + mount_point + "\"";
Process.spawn_command_line_sync(cmd, out std_out, out std_err, out ret_val);