Skip to content

Commit

Permalink
Merge pull request #44 from AmgdGocha/bugfix/db-shm_and_db-wal_don't_…
Browse files Browse the repository at this point in the history
…exist

Handling the absence of `db-shm` and `db-wal` files.
  • Loading branch information
AmgdGocha authored Dec 20, 2024
2 parents eb974b6 + c4d3134 commit a76e76c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions drivefs_sleuth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,10 @@ def get_content_caches_paths(content_cache_dir):
for root, _, content_caches in os.walk(content_cache_dir):
for content_cache in content_caches:
content_caches_paths[content_cache] = os.path.abspath(os.path.join(root, content_cache))
del (content_caches_paths['chunks.db'])
del (content_caches_paths['chunks.db-shm'])
del (content_caches_paths['chunks.db-wal'])

content_caches_paths.pop('chunks.db', None)
content_caches_paths.pop('chunks.db-shm', None)
content_caches_paths.pop('chunks.db-wal', None)

return content_caches_paths

Expand All @@ -271,9 +272,10 @@ def get_thumbnails_paths(thumbnails_dir):
for root, _, thumbnails in os.walk(thumbnails_dir):
for thumbnail in thumbnails:
thumbnails_paths[thumbnail] = os.path.abspath(os.path.join(root, thumbnail))
del (thumbnails_paths['chunks.db'])
del (thumbnails_paths['chunks.db-shm'])
del (thumbnails_paths['chunks.db-wal'])

thumbnails_paths.pop('chunks.db', None)
thumbnails_paths.pop('chunks.db-shm', None)
thumbnails_paths.pop('chunks.db-wal', None)

return thumbnails_paths

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='drivefs_sleuth',
version='1.2.0',
version='1.2.1',
description='The ultimate Google Drive File Stream Investigator!',
long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit a76e76c

Please sign in to comment.