This repository was archived by the owner on Dec 31, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 29
29
APPDATA = Path (os .getenv ('APPDATA' ))
30
30
FILE_PATH = os .path .dirname (os .path .abspath (__file__ ))
31
31
CURRENT_WORKING_DIR = Path ().cwd ()
32
+ LAUNCHER_NOT_FOUND_MSG = f"Unable to locate Launcher directory\n Current working directory: { CURRENT_WORKING_DIR } "
32
33
33
34
34
35
launcher_dir = None
43
44
launcher_name = WOX_DIR_NAME
44
45
API = WOX_API
45
46
else :
46
- raise FileNotFoundError ("Unable to locate Launcher directory" )
47
+ raise FileNotFoundError (LAUNCHER_NOT_FOUND_MSG )
47
48
48
49
while True :
49
50
if len (path .parts ) == 1 :
50
- raise FileNotFoundError ("Unable to locate Launcher directory" )
51
+ raise FileNotFoundError (LAUNCHER_NOT_FOUND_MSG )
51
52
if path .joinpath ('Settings' ).exists ():
52
53
USER_DIR = path
53
54
if USER_DIR .name == 'UserData' :
54
55
APP_DIR = USER_DIR .parent
55
56
elif str (CURRENT_WORKING_DIR ).startswith (str (APPDATA )):
56
57
APP_DIR = LOCALAPPDATA .joinpath (launcher_name )
57
58
else :
58
- raise FileNotFoundError ("Unable to locate Launcher directory" )
59
+ raise FileNotFoundError (LAUNCHER_NOT_FOUND_MSG )
59
60
break
60
61
61
62
path = path .parent
You can’t perform that action at this time.
0 commit comments