mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Apply realpath to find mounted points to unmount
Bindings created by some backup methods appears with their 'real' path in /etc/mtab, that may differ from the original /home/yunohost.backup/tmp/auto_xxx that is passed to _recursive_umount(). This fix applies realpath to the 'directory' parameter passed to _recursive_umount(). Tested OK on my own instance, where backups with Borg were failing (except the first one after a reboot) because of this issue (it was unable to clean temporary dir).
This commit is contained in:
parent
d4b69527e7
commit
f0ae164afe
1 changed files with 1 additions and 1 deletions
|
@ -2658,7 +2658,7 @@ def _recursive_umount(directory):
|
|||
points_to_umount = [
|
||||
line.split(" ")[2]
|
||||
for line in mount_lines
|
||||
if len(line) >= 3 and line.split(" ")[2].startswith(directory)
|
||||
if len(line) >= 3 and line.split(" ")[2].startswith(os.path.realpath(directory))
|
||||
]
|
||||
|
||||
everything_went_fine = True
|
||||
|
|
Loading…
Add table
Reference in a new issue