Skip to content

Commit 9d00f58

Browse files
committed
removed unnecessary use for -shm files
1 parent a1cbc89 commit 9d00f58

File tree

4 files changed

+2
-3
lines changed

4 files changed

+2
-3
lines changed

mergin/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def is_gpkg_open(self, path):
146146
f_extension = os.path.splitext(path)[1]
147147
if f_extension != '.gpkg':
148148
return False
149-
if os.path.exists(f'{path}-wal') and os.path.exists(f'{path}-shm'):
149+
if os.path.exists(f'{path}-wal'):
150150
return True
151151
return False
152152

-32 KB
Binary file not shown.

mergin/test/test_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ def test_force_gpkg_update(mc):
356356
shutil.move(mp.fpath(f_updated), mp.fpath_meta(f_updated)) # make local copy for changeset calculation (which will fail)
357357
shutil.copy(os.path.join(CHANGED_SCHEMA_DIR, 'modified_schema.gpkg'), mp.fpath(f_updated))
358358
shutil.copy(os.path.join(CHANGED_SCHEMA_DIR, 'modified_schema.gpkg-wal'), mp.fpath(f_updated + '-wal'))
359-
shutil.copy(os.path.join(CHANGED_SCHEMA_DIR, 'modified_schema.gpkg-shm'), mp.fpath(f_updated + '-shm'))
360359
mc.push_project(project_dir)
361360
# by this point local file has been updated (changes committed from wal)
362361
updated_checksum = generate_checksum(mp.fpath(f_updated))

mergin/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def do_sqlite_checkpoint(path):
8080
"""
8181
new_size = None
8282
new_checksum = None
83-
if ".gpkg" in path and os.path.exists(f'{path}-wal') and os.path.exists(f'{path}-shm'):
83+
if ".gpkg" in path and os.path.exists(f'{path}-wal'):
8484
conn = sqlite3.connect(path)
8585
cursor = conn.cursor()
8686
cursor.execute("PRAGMA wal_checkpoint=FULL")

0 commit comments

Comments
 (0)