rename file from parent metadata does not change attachment
Since recently, when I choose 'rename file from parent metadata' only the file name in the file system is changed, not the attachment name which is shown in zotero. Zotero can no longer find the file and I cannot open the file from zotero.
When I choose 'view pdf' I get a message 'the attached file could not be found' with a 'locate...' button. This button brings me to the correct directory and I can re-link the file to the attachment. The name of the attachment is still the old name and needs to be changed manually, but at least I can now open the file from zotero
Before the file and the attachment name changed, and the link remained operational
Any others with this problem?
Paul
Using 4.0.16 in firefox
When I choose 'view pdf' I get a message 'the attached file could not be found' with a 'locate...' button. This button brings me to the correct directory and I can re-link the file to the attachment. The name of the attachment is still the old name and needs to be changed manually, but at least I can now open the file from zotero
Before the file and the attachment name changed, and the link remained operational
Any others with this problem?
Paul
Using 4.0.16 in firefox
This works for me. Provide a Debug ID that shows you opening an attachment, renaming it with that option, and then trying to open it again unsuccessfully.
Thanks for responding. I must admit the conditions for issue are a bit different than first thought:
It seems not to be a version problem but a file attribute issue of the attachment: the file(s) in question has 'read only' set.
Updated issue description: when the 'read only' attribute is set on an attached file, the option 'rename file from parent metadata' _does_ change the file name on the disk, but not any of the file data in zotero (neither the 'Filename:' item, nor the bold attachment name just above it in the right hand pane ('attachment title'?).
Steps to reproduce:
select an item in zotero and expand to show the attached items
right-click an attachment en select 'show file'
In the 'select a file' dialog: right click the attached file and select 'properties'
Enable read only and click ok
click cancel to leave the 'select a file' dialog
select the parent item of the attachment and change either the title, author(s) or date
right-click the same attachment again en select 'rename file from parent metadata'
result: none of the filename/attachment title data is changed in zotero. 'View pdf' gives a 'file not found' dialog because the file name on the disk was changed but the zotero database was not updated accordingly. Pressing 'locate' opens a 'select a file' dialog in the correct directory, showing the _changed_ file name. Selecting the file and pressing ok restores the ability to view the attachment from zotero.
Expected behaviour: same as for non-read-only attachments. The option 'rename file from parent metadata' changes the file name on the disk, _and_ both the 'Filename:' item, and attachment title in the zotero database.
This is the behaviour when the 'read only' attribute is not set on the attached file. In contrast to what you observe: the attachment title has always changed for me together with the file name with the 'rename from parent metadata' option.
The Debug ID is D1461863154.
Note: this logs only the rename action since this is when the error occurs.
Paul
In 4.1 we might have more flexibility in terms of not requiring a mod time change after a rename (which would be nice, since that's that's the filesystem's behavior), but for now the best we can do is roll back the name change if the rename fails and notify the user that the file is read-only.
Thanks again for taking this seriously.
Maybe the windows designers thought the change date should only be about the file contents, not the metadata such as file name. I think it is not a bug then, is it?
An other suggestion: the read-only property was not set by me, therefore it must have been set when the pdf attachment was downloaded from IEEE. I didn't know these attributes could be transmitted over ftp/http, I thought these were only local. Also, it seems to be file specific since I have dozens of IEEE pdfs in zotero without the read-only attribute set.
Is it a bad idea (and why) if zotero cleared the read-only attibute on importing an attachment?
Paul
Anyway, this is fixed (thanks to Aurimas) in the latest 4.0 Branch dev XPI, and the fix will be included in 4.0.17.