Paladugula Siva Satyanarayana commited on
Commit
6871514
·
1 Parent(s): 4e3a973
backend/app/services/utility.py CHANGED
@@ -115,7 +115,8 @@ class UtilityClass:
115
  :return: Local file path of the downloaded DB.
116
  """
117
  if local_db_path is None:
118
- temp_dir = tempfile.gettempdir()
 
119
  local_db_path = os.path.join(temp_dir, "downloaded_db.db")
120
  dbx = dropbox.Dropbox(dropbox_token)
121
  with open(local_db_path, 'wb') as f:
 
115
  :return: Local file path of the downloaded DB.
116
  """
117
  if local_db_path is None:
118
+ temp_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "tmp")
119
+ os.makedirs(temp_dir, exist_ok=True)
120
  local_db_path = os.path.join(temp_dir, "downloaded_db.db")
121
  dbx = dropbox.Dropbox(dropbox_token)
122
  with open(local_db_path, 'wb') as f:
backend/{temp → tmp}/test.py RENAMED
File without changes