FilePool fix origin volume removale
This commit is contained in:
parent
8959e5a77e
commit
c5810758c5
@ -112,7 +112,6 @@ class FilePool(Pool):
|
|||||||
_remove_if_exists(volume)
|
_remove_if_exists(volume)
|
||||||
elif volume.volume_type == 'origin':
|
elif volume.volume_type == 'origin':
|
||||||
_remove_if_exists(volume)
|
_remove_if_exists(volume)
|
||||||
_remove_if_exists(volume)
|
|
||||||
|
|
||||||
def rename(self, volume, old_name, new_name):
|
def rename(self, volume, old_name, new_name):
|
||||||
assert issubclass(volume.__class__, FileVolume)
|
assert issubclass(volume.__class__, FileVolume)
|
||||||
@ -493,6 +492,8 @@ def copy_file(source, destination):
|
|||||||
def _remove_if_exists(volume):
|
def _remove_if_exists(volume):
|
||||||
if os.path.exists(volume.path):
|
if os.path.exists(volume.path):
|
||||||
os.remove(volume.path)
|
os.remove(volume.path)
|
||||||
|
if volume.volume_type == 'origin':
|
||||||
|
os.remove(volume.path_cow)
|
||||||
|
|
||||||
|
|
||||||
def _check_path(path):
|
def _check_path(path):
|
||||||
|
Loading…
Reference in New Issue
Block a user