mirror of
https://github.com/linuxmint/timeshift.git
synced 2024-09-11 17:07:43 +03:00
Sync filesystem before unmounting backup device
This commit is contained in:
parent
42ae712338
commit
8121cfa056
@ -1943,6 +1943,11 @@ public class Main : GLib.Object{
|
|||||||
|
|
||||||
log_msg(_("Unmounting device") + " '%s' ".printf(info.device) + _("from") + " '%s'".printf(info.mount_point));
|
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
|
//unmount
|
||||||
cmd = "umount \"" + mount_point + "\"";
|
cmd = "umount \"" + mount_point + "\"";
|
||||||
Process.spawn_command_line_sync(cmd, out std_out, out std_err, out ret_val);
|
Process.spawn_command_line_sync(cmd, out std_out, out std_err, out ret_val);
|
||||||
|
Loading…
Reference in New Issue
Block a user