Index: gc_lang/fr/oxt/DictOptions/LexiconEditor.py ================================================================== --- gc_lang/fr/oxt/DictOptions/LexiconEditor.py +++ gc_lang/fr/oxt/DictOptions/LexiconEditor.py @@ -410,11 +410,13 @@ if nResult == 1: # lFile = xFilePicker.getSelectedFiles() lFile = xFilePicker.getFiles() #print(lFile) #MessageBox(self.xDocument, "File(s): " + str(lFile), "DEBUG", INFOBOX) - spfImported = lFile[0][8:] # remove file:/// + spfImported = lFile[0][5:].lstrip("/") # remove file:// + if platform.system() != "Windows": + spfImported = "/" + spfImported except: spfImported = os.path.join(os.path.expanduser("~"), "fr.personal.json") # workaround if spfImported and os.path.isfile(spfImported): with open(spfImported, "r", encoding="utf-8") as hDst: sJSON = hDst.read() @@ -461,11 +463,13 @@ xFilePicker.setMultiSelectionMode(False) nResult = xFilePicker.execute() if nResult == 1: # lFile = xFilePicker.getSelectedFiles() lFile = xFilePicker.getFiles() - spfExported = lFile[0][8:] # remove file:/// + spfExported = lFile[0][5:].lstrip("/") # remove file:// + if platform.system() != "Windows": + spfExported = "/" + spfExported #spfExported = os.path.join(os.path.expanduser("~"), "fr.personal.json") sJSON = self.xOptionNode.getPropertyValue("personal_dic") if sJSON: with open(spfExported, "w", encoding="utf-8") as hDst: hDst.write(sJSON)