mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-31 14:58:25 -04:00
fix tmp data dir resolution when running help or version outside data dir
This commit is contained in:
parent
f321d25f4c
commit
12f32c4690
12 changed files with 30 additions and 208 deletions
archivebox/misc
|
@ -111,10 +111,10 @@ def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], over
|
|||
os.chmod(path, int(STORAGE_CONFIG.OUTPUT_PERMISSIONS, base=8))
|
||||
|
||||
@enforce_types
|
||||
def chmod_file(path: str, cwd: str='.') -> None:
|
||||
def chmod_file(path: str, cwd: str='') -> None:
|
||||
"""chmod -R <permissions> <cwd>/<path>"""
|
||||
|
||||
root = Path(cwd) / path
|
||||
root = Path(cwd or os.getcwd()) / path
|
||||
if not root.exists():
|
||||
raise Exception('Failed to chmod: {} does not exist (did the previous step fail?)'.format(path))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue