File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,22 @@ def get_binary(name):
1111 elif os .path .exists (name ):
1212 binpath = "./%s" % (name )
1313
14- logging .info ("binpath %s" , binpath )
14+ logging .debug ("binpath %s" , binpath )
1515 return binpath
1616
1717def get_resource (path ):
1818 rpath = path
1919 if hasattr (sys , "frozen" ):
2020 rpath = os .path .abspath (os .path .join (sys ._MEIPASS , '..' , 'Resources' , path ))
21- logging .info ("resourcepath %s" , rpath )
21+ if not os .path .exists (rpath ):
22+ # DMG may be read-only; fall-back to datadir (ie. so language models can be added)
23+ rpath = get_datadir (path )
24+ logging .debug ("resourcepath %s" , rpath )
2225 return rpath
2326
2427def get_datadir (path ):
2528 datadir = path
2629 if hasattr (sys , "frozen" ):# and sys.frozen == "macosx_app":
2730 datadir = os .path .join (os .environ ['HOME' ], '.gentle' , path )
28- logging .info ("datadir %s" , datadir )
31+ logging .debug ("datadir %s" , datadir )
2932 return datadir
You can’t perform that action at this time.
0 commit comments