@@ -124,14 +124,25 @@ private static void testKnownIssues() {
124
124
String errorString = new String ();
125
125
String addString = new String ();
126
126
IPath installPath = ConfigurationPreferences .getInstallationPath ();
127
- if (!installPath .toFile ().getParentFile ().canWrite ()) {
128
- errorString += addString + "The plugin Needs write access to " + installPath .toString ();
129
- addString = "\n and\n " ;
127
+ File installFile = installPath .toFile ();
128
+ if (installFile .exists ()) {
129
+ if (!installFile .canWrite ()) {
130
+ errorString += addString + "The folder " + installPath .toString ()
131
+ + " exists but Sloeber does not have write access to it." ;
132
+ addString = "\n and\n " ;
133
+ }
134
+ } else {
135
+ if (!installFile .getParentFile ().canWrite ()) {
136
+ errorString += addString + "Sloeber does not have write access to "
137
+ + installFile .getParentFile ().toString () + " and therefore can not create the folder "
138
+ + installPath .toString ();
139
+ addString = "\n and\n " ;
140
+ }
130
141
}
131
142
132
143
if (installPathToLong ()) {
133
144
errorString += errorString + addString ;
134
- errorString += "Due to issues with long pathnames on Windows, the plugin installation path must be less than 40 characters. \n " ;
145
+ errorString += "Due to issues with long pathnames on Windows, the Sloeber installation path must be less than 40 characters. \n " ;
135
146
errorString += "Your current path: " + installPath .toString ();
136
147
errorString += " is too long and the plugin will no longer function correctly for all packages." ;
137
148
errorString += "Please visit issue #705 for details. https://github.com/Sloeber/arduino-eclipse-plugin/issues/705" ;
0 commit comments