Skip to content

Commit

Permalink
Merge pull request #112 from forcedotcom/fix-readonly-error-message
Browse files Browse the repository at this point in the history
Fix readonly error message
  • Loading branch information
rjmazzeo authored Aug 15, 2016
2 parents 1a60d0b + 10b6b3a commit 280eca7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ public void createAndShowGUI() throws ControllerInitializationException {
File configFile = new File(config.getFilename());
if (!configFile.canWrite()) {
String errMsg = Messages.getFormattedString("Controller.errorConfigWritable", config.getFilename());

String currentWorkingDir = System.getProperty("user.dir");
if (currentWorkingDir.startsWith("/Volumes")){
//user is trying to launch dataloader from the dmg. this is not supported
errMsg = Messages.getString("Controller.errorConfigWritableDmg");
}

logger.fatal(errMsg);
throw new ControllerInitializationException(errMsg);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Controller.errorFieldTypes=Client not logged in. Cannot set Field Types.
Controller.errorReferenceTypes=Client not logged in. Cannot set Object Reference Types.
Controller.errorEntityTypes=Client not logged in. Cannot set Entity Types.
Controller.errorConfigWritable=Please make sure that the config file: {0} exists and is writable.
Controller.errorConfigWritableDmg=Data Loader must be installed in the Applications folder. Please copy it to the correct folder and try again.
Controller.errorConfigSave=Error saving config file: {0}. Please make sure that it is writable.
Controller.errorConfigLoad=Error loading config file: {0}. Please make sure that it exists and is readable
Controller.errorOperationNotSupported=Requested operation: {0} is not supported. Please check your configuration. Supported operations are: insert, update, upsert, delete, extract.
Expand Down

0 comments on commit 280eca7

Please sign in to comment.