Merge pull request #1152 from tiagodc/master

fix #1151 - check for symbolic links before removing directories in run_opensfm.py

Former-commit-id: 8489cf06b6
pull/1161/head
Piero Toffanin 2020-08-24 18:32:09 -04:00 zatwierdzone przez GitHub
commit 1566d6a1ac
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -34,10 +34,12 @@ class ODMOpenSfMStage(types.ODM_Stage):
self.update_progress(70)
if args.optimize_disk_space:
shutil.rmtree(octx.path("features"))
shutil.rmtree(octx.path("matches"))
shutil.rmtree(octx.path("exif"))
shutil.rmtree(octx.path("reports"))
for folder in ["features", "matches", "exif", "reports"]:
folder_path = octx.path(folder)
if os.path.islink(folder_path):
os.unlink(folder_path)
else:
shutil.rmtree(folder_path)
# If we find a special flag file for split/merge we stop right here
if os.path.exists(octx.path("split_merge_stop_at_reconstruction.txt")):