UNRECOGNIZED_PATH after renaming
Report ID: D1774159184
When I rename an attachment pdf file without move it (with the ZotFile plugin), I can't anymore open or click on it. In the log view, I get an error in a zotero file (although the error append in using ZotFile).
Steps to reproduce:
1. Start Zotero.
2. Be sure that in ZotFile preferences, the filed "Custom Location" in "Location of Files" is empty.
3. Create a new entry (book or anything else).
4. Add an attachment on it with "Attach Link to File".
5. Right click on the attachment => "Manage Attachments" => "Rename Attachments"
Zotero displays the message "NS_ERROR_FILE_UNRECOGNIZED_PATH Exception: Component returned failure code: 0x80520001" and "[JavaScript Error: "Error: Unexpected value './ert.pdf'" {file: "chrome://zotero/content/xpcom/file.js" line: 56}]" in the error log if I right click on my attachment or my entry, I can't anymore select or open it.
When I rename an attachment pdf file without move it (with the ZotFile plugin), I can't anymore open or click on it. In the log view, I get an error in a zotero file (although the error append in using ZotFile).
Steps to reproduce:
1. Start Zotero.
2. Be sure that in ZotFile preferences, the filed "Custom Location" in "Location of Files" is empty.
3. Create a new entry (book or anything else).
4. Add an attachment on it with "Attach Link to File".
5. Right click on the attachment => "Manage Attachments" => "Rename Attachments"
Zotero displays the message "NS_ERROR_FILE_UNRECOGNIZED_PATH Exception: Component returned failure code: 0x80520001" and "[JavaScript Error: "Error: Unexpected value './ert.pdf'" {file: "chrome://zotero/content/xpcom/file.js" line: 56}]" in the error log if I right click on my attachment or my entry, I can't anymore select or open it.
I specify that when I use renaming with moving (i.e. specifying a path), it works perfectly.
For a basic explanation of ZotFile's "Custom Location" setting, see here:
https://guides.lib.berkeley.edu/zotero
-> "ZotFile" -> "Manage & Sync PDFs with ZotFile"
(See also here for troubleshooting related issues.)
@Milleras: It seems to me that ZotFile currently can't rename linked files without moving them. If you choose "Attach stored copy of file(s)", ZotFile's renaming function will convert linked files to stored files. If you select a "Custom Location", linked files will be moved to this new path.
A solution might be to use Zotero's own renaming function for linked files that have been added outside of ZotFile. With Zotero's function "Rename File From Parent Metadata" in the context menu, attachments won't be moved. BTW, with the Zutilo add-on you can set separate keyboard shortcuts for both ZotFile's and Zotero's renaming functions. (In Zutilo's preferences, the Shortcuts table lists them as "Move and rename attachments" and "Rename attachments", respectively.) You can also configure Zotero's renaming scheme with the preference
extensions.zotero.attachmentRenameFormatString
in the Config Editor. Also note that you can manually rename files.I think it would be useful if ZotFile could offer "move only" and "rename only" functions for linked files. (The "move only" option can currently be achieved with the hidden preference
extensions.zotfile.disable_renaming
. However, this breaks automatic triggering of the function when adding new items.)