More work on transfer sending

This commit is contained in:
Kovid Goyal
2021-10-10 13:04:47 +05:30
parent 855681200f
commit 5e033773dd
2 changed files with 233 additions and 9 deletions

View File

@@ -133,8 +133,9 @@ def should_be_compressed(path: str) -> bool:
return True
def abspath(path: str) -> str:
return os.path.normpath(os.path.join(_cwd or os.getcwd(), path))
def abspath(path: str, use_home: bool = False) -> str:
base = home_path() if use_home else (_cwd or os.getcwd())
return os.path.normpath(os.path.join(base, path))
def home_path() -> str: