@@ -213,7 +213,6 @@ protected IStatus run(IProgressMonitor monitor) {
213213 *
214214 * @return true is installation can be done else false
215215 */
216- @ SuppressWarnings ("boxing" )
217216 private boolean DownloadFolderConditionsOK () {
218217 IPath installPath = ConfigurationPreferences .getInstallationPath ();
219218 installPath .toFile ().mkdirs ();
@@ -223,12 +222,19 @@ private boolean DownloadFolderConditionsOK() {
223222 windowsPathToLong = installPath .toString ().length () > 40 ;
224223 }
225224 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+ }
232238 Common .log (new Status (IStatus .ERROR , PLUGIN_ID , errorMessage ));
233239 return false ;
234240 }
@@ -407,7 +413,6 @@ static boolean isPatron() {
407413 try {
408414 urlConnect .getContent ();
409415 } catch (IOException e ) {
410- // TODO Auto-generated catch block
411416 e .printStackTrace ();
412417 }
413418 int length = urlConnect .getContentLength ();
0 commit comments