fix _update_browse_history_setup (#345)
This commit is contained in:
@@ -813,7 +813,7 @@ class SetupController:
|
||||
|
||||
def _update_browse_history_setup(self, **config):
|
||||
cache_path = os.path.join(self.cache_dir, "history_new.sqlite")
|
||||
db_url = "https://drive.usercontent.google.com/u/0/uc?id=1Lv74QkJYDWVX0RIgg0Co-DUcoYpVL0oX&export=download" # google drive
|
||||
db_url = "https://huggingface.co/datasets/xlangai/ubuntu_osworld_file_cache/resolve/main/chrome/44ee5668-ecd5-4366-a6ce-c1c9b8d4e938/history_empty.sqlite?download=true"
|
||||
if not os.path.exists(cache_path):
|
||||
max_retries = 3
|
||||
downloaded = False
|
||||
@@ -839,7 +839,9 @@ class SetupController:
|
||||
else:
|
||||
logger.info("File already exists in cache directory")
|
||||
# copy a new history file in the tmp folder
|
||||
db_path = cache_path
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
db_path = os.path.join(tmp_dir, "history_empty.sqlite")
|
||||
shutil.copy(cache_path, db_path)
|
||||
|
||||
history = config['history']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user