mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-28 17:03:52 +08:00
dragonpilot beta3
date: 2023-10-09T10:55:55 commit: 91b6e3aecd7170f24bccacb10c515ec281c30295
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import os
|
||||
import urllib.parse
|
||||
from common.file_helpers import mkdirs_exists_ok
|
||||
from openpilot.common.file_helpers import mkdirs_exists_ok
|
||||
|
||||
DEFAULT_CACHE_DIR = os.path.expanduser("~/.commacache")
|
||||
DEFAULT_CACHE_DIR = os.getenv("CACHE_ROOT", os.path.expanduser("~/.commacache"))
|
||||
|
||||
def cache_path_for_file_path(fn, cache_prefix=None):
|
||||
dir_ = os.path.join(DEFAULT_CACHE_DIR, "local")
|
||||
def cache_path_for_file_path(fn, cache_dir=DEFAULT_CACHE_DIR):
|
||||
dir_ = os.path.join(cache_dir, "local")
|
||||
mkdirs_exists_ok(dir_)
|
||||
fn_parsed = urllib.parse.urlparse(fn)
|
||||
if fn_parsed.scheme == '':
|
||||
|
||||
Reference in New Issue
Block a user