mirror of
https://github.com/linuxmint/timeshift.git
synced 2024-09-19 04:57:17 +03:00
Merge pull request #289 from bazoocaze/master
Workaround for Docker mounting rootfs on /var/lib/docker/plugins
This commit is contained in:
commit
3a43d78b27
@ -870,6 +870,8 @@ public class Device : GLib.Object{
|
||||
|
||||
for (int i = lines.length - 1; i >= 0; i--){
|
||||
|
||||
bool ignoreEntry = false;
|
||||
|
||||
string line = lines[i].strip();
|
||||
if (line.length == 0) { continue; }
|
||||
|
||||
@ -882,12 +884,20 @@ public class Device : GLib.Object{
|
||||
int k = 1;
|
||||
foreach(string val in line.split(" ")){
|
||||
if (val.strip().length == 0){ continue; }
|
||||
if (ignoreEntry){ break; }
|
||||
switch(k++){
|
||||
case 1: //device
|
||||
pi.device = val.strip();
|
||||
break;
|
||||
case 2: //mountpoint
|
||||
mp.mount_point = val.strip().replace("""\040"""," "); // replace space. TODO: other chars?
|
||||
|
||||
// HACK: ignore Docker mounting(?) rootfs on /var/lib/docker
|
||||
if (mp.mount_point.contains("/docker")){
|
||||
ignoreEntry = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!mount_list.contains(mp.mount_point)){
|
||||
mount_list.add(mp.mount_point);
|
||||
pi.mount_points.add(mp);
|
||||
@ -905,6 +915,8 @@ public class Device : GLib.Object{
|
||||
}
|
||||
}
|
||||
|
||||
if (ignoreEntry) { continue; }
|
||||
|
||||
// resolve device names ----------------
|
||||
|
||||
pi.device = resolve_device_name(pi.device);
|
||||
|
Loading…
Reference in New Issue
Block a user