diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js index be5285255b..214df2c375 100644 --- a/chrome/content/zotero/xpcom/dataDirectory.js +++ b/chrome/content/zotero/xpcom/dataDirectory.js @@ -237,7 +237,9 @@ Zotero.DataDirectory = { let title = Zotero.getString('general.accessDenied'); let msg = Zotero.getString('dataDir.dirCannotBeCreated', [Zotero.appName, dataDir]) + "\n\n" - + Zotero.getString('dataDir.checkDirWriteAccess', Zotero.appName); + + Zotero.ftl.formatValueSync( + 'data-dir-check-parent-write-access', { path: PathUtils.parent(dataDir) } + ); // The default location needs to be writable, so don't offer an alternative if (isDefaultDir) { diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl index 0bad3e2b73..f2b9b55842 100644 --- a/chrome/locale/en-US/zotero/zotero.ftl +++ b/chrome/locale/en-US/zotero/zotero.ftl @@ -1187,6 +1187,7 @@ plugins-blocked-plugin = .message = This plugin has been disabled by { -app-name }. data-dir-unsupported-storage = This can happen if the { -app-name } data directory is in a cloud storage folder (OneDrive, Dropbox, etc.) or on a network share. +data-dir-check-parent-write-access = Make sure you have write access to { $path } and that security software isn’t preventing { -app-name } from writing to the disk. login-manager-reset = { -app-name } was unable to read your saved login information, so it has been reset. Please log in again in the { preferences-pane-account } pane of the { -app-name } settings. diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index de5370f78b..fc3e3d899b 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -176,7 +176,6 @@ attachmentBasePath.clearBasePath.existingAttachments.plural = %S existing att attachmentBasePath.clearBasePath.button = Clear Base Directory Setting dataDir.dirCannotBeCreated = The %S data directory (%S) cannot be created. -dataDir.checkDirWriteAccess = Make sure you have write access to this directory and that security software isn’t preventing %S from writing to the disk. dataDir.databaseCannotBeOpened = The %S database cannot be opened. dataDir.checkPermissions = Make sure you have read and write permissions for all files in the %1$S data directory and that security software isn’t preventing %1$S from accessing that directory. dataDir.moveToDefaultLocation = You may be able to fix this problem by moving the data directory to the new default location in your home directory. %S will automatically detect the new location. diff --git a/test/tests/dataDirectoryTest.js b/test/tests/dataDirectoryTest.js index 24956bcdd0..e826074f6e 100644 --- a/test/tests/dataDirectoryTest.js +++ b/test/tests/dataDirectoryTest.js @@ -178,6 +178,7 @@ describe("Zotero.DataDirectory", function () { assert.isTrue(alertStub.calledOnce); assert.include(alertStub.firstCall.args[2], dataDir); + assert.include(alertStub.firstCall.args[2], `write access to ${parentDir} `); assert.isFalse(confirmStub.called); assert.isTrue(quitStub.calledOnce); assert.isFalse(await IOUtils.exists(dataDir));