Skip to content

Commit

Permalink
#151 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gornostal committed Aug 18, 2017
1 parent cf571b5 commit c5c0d2a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ulauncher/search/file_browser/FileQueries.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ class FileQueries(KeyValueDb):
@singleton
def get_instance(cls):
"""
Migrates the old cache file into one with a corrected filename.
Issue #151: Migrates the old cache file into one with a corrected filename.
TODO: Remove once enough users are migrated
"""
old_browser_cache = os.path.join(CACHE_DIR, 'file_borwser_queries.db')
browser_cache = os.path.join(CACHE_DIR, 'file_browser_queries.db')
if os.path.isfile(old_browser_cache):
os.rename(old_browser_cache, new_browser_cache)
db = cls(new_browser_cache)
os.rename(old_browser_cache, browser_cache)

db = cls(browser_cache)
db.open()
return db

Expand Down

0 comments on commit c5c0d2a

Please sign in to comment.