Bug 742804 - Use a more specific message when sdcard not available for downloads; r=blassey
authorGeoff Brown <gbrown@mozilla.com>
Tue, 04 Dec 2012 08:57:48 -0700
changeset 114927 8de5e2f0d73c15d09c7e8e3f04073cf865c6e7b8
parent 114926 198a2cd21e1bb5fa39508db2a678bd67d1c121b2
child 114928 2140f915a307a7f2c393844b7c8b44d0acc4edc9
push id23949
push userryanvm@gmail.com
push dateWed, 05 Dec 2012 01:17:54 +0000
treeherdermozilla-central@96343524e1fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs742804
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 742804 - Use a more specific message when sdcard not available for downloads; r=blassey
dom/locales/en-US/chrome/nsWebBrowserPersist.properties
uriloader/exthandler/nsExternalHelperAppService.cpp
--- a/dom/locales/en-US/chrome/nsWebBrowserPersist.properties
+++ b/dom/locales/en-US/chrome/nsWebBrowserPersist.properties
@@ -3,13 +3,14 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 readError=%S could not be saved, because the source file could not be read.\n\nTry again later, or contact the server administrator.
 writeError=%S could not be saved, because an unknown error occurred.\n\nTry saving to a different location.
 launchError=%S could not be opened, because an unknown error occurred.\n\nTry saving to disk first and then opening the file.
 diskFull=There is not enough room on the disk to save %S.\n\nRemove unnecessary files from the disk and try again, or try saving in a different location.
 readOnly=%S could not be saved, because the disk, folder, or file is write-protected.\n\nWrite-enable the disk and try again, or try saving in a different location.
 accessError=%S could not be saved, because you cannot change the contents of that folder.\n\nChange the folder properties and try again, or try saving in a different location.
+accessErrorSD=No SD card.\n\nAn SD card is required to download %S.
 helperAppNotFound=%S could not be opened, because the associated helper application does not exist. Change the association in your preferences.
 noMemory=There is not sufficient memory to complete the action you requested.\n\nQuit some applications and try again.
 title=Downloading %S
 fileAlreadyExistsError=%S could not be saved, because a file already exists with the same name as the '_files' directory.\n\nTry saving to a different location.
 fileNameTooLongError=%S could not be saved, because the file name was too long.\n\nTry saving with a shorter file name.
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1656,17 +1656,22 @@ void nsExternalAppHandler::SendStatusCha
     case NS_ERROR_FILE_READ_ONLY:
         // Attempt to write to read/only file.
         msgId.AssignLiteral("readOnly");
         break;
 
     case NS_ERROR_FILE_ACCESS_DENIED:
         if (type == kWriteError) {
           // Attempt to write without sufficient permissions.
+#if defined(ANDROID)
+          // On Android, assume the SD card is missing or read-only
+          msgId.AssignLiteral("accessErrorSD");
+#else
           msgId.AssignLiteral("accessError");
+#endif
         }
         else
         {
           msgId.AssignLiteral("launchError");
         }
         break;
 
     case NS_ERROR_FILE_NOT_FOUND: