@@ -213,7 +213,6 @@ protected IStatus run(IProgressMonitor monitor) {
213
213
*
214
214
* @return true is installation can be done else false
215
215
*/
216
- @ SuppressWarnings ("boxing" )
217
216
private boolean DownloadFolderConditionsOK () {
218
217
IPath installPath = ConfigurationPreferences .getInstallationPath ();
219
218
installPath .toFile ().mkdirs ();
@@ -223,12 +222,19 @@ private boolean DownloadFolderConditionsOK() {
223
222
windowsPathToLong = installPath .toString ().length () > 40 ;
224
223
}
225
224
if (cantWrite || windowsPathToLong ) {
226
- String errorMessage = cantWrite ? "The plugin Needs write access to " + installPath .toString ()
227
- : new String ();
228
- errorMessage += ((windowsPathToLong && cantWrite ) ? '\n' : new String ());
229
- errorMessage += (windowsPathToLong ? "The path " + installPath .toString () + " is to long"
230
- : new String ());
231
-
225
+ String errorMessage = new String ();
226
+ if (cantWrite ) {
227
+ errorMessage = "The plugin Needs write access to " + installPath .toString ();
228
+ }
229
+ if (windowsPathToLong ) {
230
+ if (cantWrite ) {
231
+ errorMessage += '\n' ;
232
+ }
233
+ errorMessage += "Due to issues with long pathnames on Windows, the plugin installation path must less than 40 characters. \n " ;
234
+ errorMessage += "Your current path: " + installPath .toString ();
235
+ errorMessage += " is too long and the plugin will no longer function correctly for all packages." ;
236
+ errorMessage += "Please visit issue #705 for details. https://github.com/Sloeber/arduino-eclipse-plugin/issues/705" ;
237
+ }
232
238
Common .log (new Status (IStatus .ERROR , PLUGIN_ID , errorMessage ));
233
239
return false ;
234
240
}
@@ -407,7 +413,6 @@ static boolean isPatron() {
407
413
try {
408
414
urlConnect .getContent ();
409
415
} catch (IOException e ) {
410
- // TODO Auto-generated catch block
411
416
e .printStackTrace ();
412
417
}
413
418
int length = urlConnect .getContentLength ();
0 commit comments