[ZotFile] Renaming attachment removes file
Hi,
When I rename an attachment, the file is deleted. Could you please have a look at this issue?
Here is some information about the system, steps to reproduce the problem and what I observe.
OS: Ubuntu 20.04.2 LTS
Zotero: 5.0.96
Zotfile: 5.0.16-fx
ZotFile Preferences:
- "Source Folder..." is empty
- "Custom Location" is selected. The field after it is empty.
How to reproduce the issue:
1 - open Zotero
2 - unfold an item to see its attachments
3 - right-click on a linked attachment
4 - select "Manage Attachments" > "Rename Attachments"
5 - answer "OK" to "Do you want to move and rename 1 attachments?"
6 - the following is observed:
6.1 - the new name shown in Zotero for the linked attachment is correct
6.2 - the corresponding file does not exist neither under its original name nor the new name on the original folder
6.3 - "Help" > "Report Errors" reports no error
7 - right-click on the rename linked attachment or in the item name, or double click on the rename linked attachment
8 - the following is observed:
8.1 - no context menu is shown, no file is opened
8.2 - "Help" > "Report Errors reports":
[JavaScript Error: "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]" {file: "chrome://zotero/content/xpcom/file.js" line: 47}]
[JavaScript Error: "Error: Unexpected value './[new name of the attachment omitted].pdf'" {file: "chrome://zotero/content/xpcom/file.js" line: 56}]
Kind regards,
Thomas
When I rename an attachment, the file is deleted. Could you please have a look at this issue?
Here is some information about the system, steps to reproduce the problem and what I observe.
OS: Ubuntu 20.04.2 LTS
Zotero: 5.0.96
Zotfile: 5.0.16-fx
ZotFile Preferences:
- "Source Folder..." is empty
- "Custom Location" is selected. The field after it is empty.
How to reproduce the issue:
1 - open Zotero
2 - unfold an item to see its attachments
3 - right-click on a linked attachment
4 - select "Manage Attachments" > "Rename Attachments"
5 - answer "OK" to "Do you want to move and rename 1 attachments?"
6 - the following is observed:
6.1 - the new name shown in Zotero for the linked attachment is correct
6.2 - the corresponding file does not exist neither under its original name nor the new name on the original folder
6.3 - "Help" > "Report Errors" reports no error
7 - right-click on the rename linked attachment or in the item name, or double click on the rename linked attachment
8 - the following is observed:
8.1 - no context menu is shown, no file is opened
8.2 - "Help" > "Report Errors reports":
[JavaScript Error: "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]" {file: "chrome://zotero/content/xpcom/file.js" line: 47}]
[JavaScript Error: "Error: Unexpected value './[new name of the attachment omitted].pdf'" {file: "chrome://zotero/content/xpcom/file.js" line: 56}]
Kind regards,
Thomas
"Error: Unexpected value './[new name of the attachment omitted].pdf'" {file: "chrome://zotero/content/xpcom/file.js" line: 56}
On ZotFile website, it says: "Reporting a bug - You can report bugs on the Zotfile thread in the Zotero forum." On that thread, you wrote: "OK, closing this thread. Please start new threads for ZotFile-related issues. Be sure to include ZotFile in your issue summary in the thread title." Did this policy change? Maybe ZotFile developers are not reading this forum anymore?
I am sorry the error was not correct on my previous message. The problem is not that a filename is not been created. I have updated the message.
See here for a related discussion:
https://forums.zotero.org/discussion/85032/unrecognized-path-after-renaming
What I like about the "Rename Attachments" feature is that it can move files into a new directory structure. I would really like to see more Zotero native capability to manage/change file names and directory structure.