Skip to content

Commit 6da366f

Browse files
committed
Windows fix
1 parent e4e27c2 commit 6da366f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opendm/osfm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ def get_all_submodel_paths(submodels_path, *all_paths):
796796

797797
def is_submodel(opensfm_root):
798798
# A bit hackish, but works without introducing additional markers / flags
799-
return os.path.islink(os.path.join(opensfm_root, "exif")) or \
799+
# Look at the path of the opensfm directory and see if "submodel_" is part of it
800+
parts = os.path.abspath(opensfm_root).split(os.path.sep)
801+
802+
return (len(parts) >= 2 and parts[-2][:9] == "submodel_") or \
800803
os.path.isfile(os.path.join(opensfm_root, "split_merge_stop_at_reconstruction.txt")) or \
801804
os.path.isfile(os.path.join(opensfm_root, "features", "empty"))

0 commit comments

Comments
 (0)