add quick fix for linux user home path
parent
925d928a32
commit
8ee7e6d2a4
|
|
@ -8,6 +8,18 @@ from modules import shared
|
||||||
|
|
||||||
# this is the default root path
|
# this is the default root path
|
||||||
root_path = os.getcwd()
|
root_path = os.getcwd()
|
||||||
|
util.printD(f"Root Path is: {root_path}")
|
||||||
|
|
||||||
|
# if path is start with "~/" means root path is under linux's user home
|
||||||
|
# so need to use os.path.expanduser("~") to get the real path
|
||||||
|
if root_path.startswith("~/"):
|
||||||
|
user_home = os.path.expanduser("~")
|
||||||
|
util.printD(f"Root Path is under User Home: {user_home}")
|
||||||
|
root_path = os.path.join(user_home, root_path[2:])
|
||||||
|
util.printD(f"Expanded Root Path is: {root_path}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# if command line arguement is used to change model folder,
|
# if command line arguement is used to change model folder,
|
||||||
# then model folder is in absolute path, not based on this root path anymore.
|
# then model folder is in absolute path, not based on this root path anymore.
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import requests
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
version = "1.10.2"
|
version = "1.10.3"
|
||||||
|
|
||||||
def_headers = {'User-Agent': 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
|
def_headers = {'User-Agent': 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
|
||||||
"Authorization": ""}
|
"Authorization": ""}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue