Skip to content

Commit 9552372

Browse files
committed
Handle unfinished pull
1 parent 8e3f2ec commit 9552372

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mergin/merginproject.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,14 @@ def apply_pull_actions(self, actions: List[PullAction], download_dir: str, serve
781781
conflict = self.create_conflicted_copy(path, mc.username())
782782
conflicts.append(conflict)
783783
if self.is_versioned_file(path):
784-
self.geodiff.make_copy_sqlite(server, live)
785-
self.geodiff.make_copy_sqlite(server, basefile)
784+
try:
785+
self.geodiff.make_copy_sqlite(server, live)
786+
self.geodiff.make_copy_sqlite(server, basefile)
787+
except pygeodiff.GeoDiffLibError:
788+
self.log.info("failed to create SQLite copy for file: " + path)
789+
# create unfinished pull copy instead
790+
f_server_unfinished = self.fpath_unfinished_pull(path)
791+
self.geodiff.make_copy_sqlite(server, f_server_unfinished)
786792
else:
787793
shutil.copy(server, live)
788794

0 commit comments

Comments
 (0)