Skip to content

Commit

Permalink
URI conversion for 4diac system path had issues with spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
azoitl authored and oberlehner committed Jan 8, 2025
1 parent ca173a5 commit a6cfce7
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
*******************************************************************************/
package org.eclipse.fordiac.ide.library;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URISyntaxException;
import java.nio.file.DirectoryStream.Filter;
import java.nio.file.FileSystems;
import java.nio.file.Files;
Expand Down Expand Up @@ -1130,12 +1130,10 @@ public void addLibraryChangeListener() {
}

private static Path getStandardLibPath() {
try {
final Path fordiacInstallPath = Paths.get(Platform.getInstallLocation().getURL().toURI());
return fordiacInstallPath.resolve(TypeLibraryTags.TYPE_LIBRARY);
} catch (final URISyntaxException e) {
FordiacLogHelper.logError("Cannot resolve system lib path!", e); //$NON-NLS-1$
}
return null;
// go why a java file to handle any special characters in the installation
// location URL
final File installLocationFile = new File(Platform.getInstallLocation().getURL().getPath());
final Path fordiacInstallPath = installLocationFile.toPath();
return fordiacInstallPath.resolve(TypeLibraryTags.TYPE_LIBRARY);
}
}

0 comments on commit a6cfce7

Please sign in to comment.