diff --git a/src/unimacro/UnimacroGrammars/_clickbyvoice.py b/src/unimacro/UnimacroGrammars/_clickbyvoice.py index 8fde6c4..26bd705 100644 --- a/src/unimacro/UnimacroGrammars/_clickbyvoice.py +++ b/src/unimacro/UnimacroGrammars/_clickbyvoice.py @@ -343,8 +343,6 @@ def fillInstanceVariables(self): - - finally: thisGrammar.unload() elif __name__.find('.') == -1: diff --git a/src/unimacro/UnimacroGrammars/_folders.py b/src/unimacro/UnimacroGrammars/_folders.py index fa9d93d..b541e13 100644 --- a/src/unimacro/UnimacroGrammars/_folders.py +++ b/src/unimacro/UnimacroGrammars/_folders.py @@ -621,10 +621,14 @@ def getActiveFolder(self, hndle=None, className=None): if os.path.isdir(f): nf = os.path.normpath(f) if nf != self.prevActiveFolder: - self.debug("getActiveFolder: %s",nf) + self.debug("getActiveFolder, got: %s",nf) self.prevActiveFolder = nf return nf - self.warning(f'getActiveFolder, strange invalid path for folder: "{f}"' ) + result = extenvvars.getFolderFromLibraryName(f) + if result and os.path.isdir(f): + self.debug("getActiveFolder, via getFolderFromLibraryName %s: %s", f, result) + return os.path.normpath(result) + self.warning('getActiveFolder, strange invalid path for folder: %s', f) return None def fillListsForActiveFolder(self, activeFolder): @@ -2446,7 +2450,7 @@ def unload(): # get hndle of a explore window (via _general "give window info") and try interactive # thisGrammar.catchTimerRecentFolders(132524, "CabinetWClass") - # thisGrammar.getActiveFolder(329491) + thisGrammar.getActiveFolder(67062) thisGrammar.displayRecentFolders() # # Words = ['folder', 'dtactions']