Force empty storage filenames to '_'
Hopefully fixes https://forums.zotero.org/discussion/71039/sync-error-empty-path-for-item
This commit is contained in:
parent
a9e047cc9e
commit
24b9612a56
2 changed files with 2 additions and 2 deletions
|
@ -2810,7 +2810,7 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentFilename', {
|
|||
if (!path) {
|
||||
return '';
|
||||
}
|
||||
var prefixedPath = path.match(/^(?:attachments|storage):(.+)$/);
|
||||
var prefixedPath = path.match(/^(?:attachments|storage):(.*)$/);
|
||||
if (prefixedPath) {
|
||||
return prefixedPath[1];
|
||||
}
|
||||
|
|
|
@ -687,7 +687,7 @@ Zotero.Sync.Storage.Local = {
|
|||
|
||||
var filename = item.attachmentFilename;
|
||||
if (!filename) {
|
||||
throw new Error("Empty path for item " + item.key);
|
||||
Zotero.debug("Empty filename for item " + item.key, 2);
|
||||
}
|
||||
// Don't save Windows aliases
|
||||
if (filename.endsWith('.lnk')) {
|
||||
|
|
Loading…
Reference in a new issue