Prevent copied PDF files being read-only
When I store PDF files by dragging/dropping onto Zotero records, the resulting files are read-only (or at least some of them are), preventing me from making annotations. My work around is to periodically make the entire contents of the 'storage' folder writeable but it would be ideal if the files were stored writeable in the first place.
http://www.astahost.com/info.php/Windows-Umask-Option_t13891.html
Zotero just saves the file. Your OS tells you that it's read only.
modify chrome/content/zotero/xpcom/attachments.js (in zotero.jar of the Firefox profile extensions) :
// AFTER EXISTING (around line 86, function importFromFile)
// Point to copied file
var newFile = destDir.clone();
newFile.append(newName);
// ADD NEW LINE
newFile.permissions = 0777;
If only I could have run "chmod" recursively through the folder tree it would have been solved a long time ago!
So I suppose the trick can be usefull in specific cases.
I plan to sync only zotero.sqlite beetween users with the built-in option.
The goal is to get a multi-computer database without duplicate files and without messing with files and folders.
Do you see any reason for this to fail?
Best regards
-what happens when someone decides to rename a file using Zotero
-are the folder names inside Zotero data directory guaranteed to be globally unique so that there are no possible for conflicting folder names between two local libraries
-how do you handle conflicts when two users edit the same file
I would go with the buit-in file sync instead.
I believe that happens:
1) the file is renamed
2) the change is registered into zotero.sqlite
3) zotero.sqlite is synchronized
4) for every user the attachement point to the renamed file
-are the folder names inside Zotero data directory guaranteed to be globally unique so that there are no possible for conflicting folder names between two local libraries
The risk is that at the same time to users add a new attached file AND the same folder name (random key) is required? It seems extremely unilkely...
-how do you handle conflicts when two users edit the same file
Our database is mainly pdf with a few xls, doc, txt and artwork. I suppose Excel and Word would pop up with a readonly warning, and any text editor would ask if one wants to reload the changed file.
I would go with the buit-in file sync instead.
The problem is, our file database weights more than 20GB. So I don't believe file sync is an option.
... Am I wrong?
Thank for your help.