Merge "lvm-backup: Normalize path when comparing current path and mount point"
This commit is contained in:
commit
5ed2b00e72
@ -303,7 +303,8 @@ def validate_lvm_params(backup_opt_dict):
|
|||||||
|
|
||||||
|
|
||||||
def _umount(path):
|
def _umount(path):
|
||||||
if os.getcwd().startswith(path):
|
# Change dir if we are within the mount point to be removed.
|
||||||
|
if os.getcwd().startswith(os.path.normpath(path)):
|
||||||
os.chdir('/')
|
os.chdir('/')
|
||||||
umount_proc = subprocess.Popen('{0} -l -f {1}'.format(
|
umount_proc = subprocess.Popen('{0} -l -f {1}'.format(
|
||||||
utils.find_executable('umount'), path),
|
utils.find_executable('umount'), path),
|
||||||
|
Loading…
Reference in New Issue
Block a user