1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-05 16:15:25 +02:00

Bug 497442 Install libraries in versioned directories.

To be consistent with platforms and to avoid issues with deleting
directories on Windows.

Change-Id: I9284413e8d864bdd49b9f8a0b171bc2d5af719f1
This commit is contained in:
Doug Schaefer 2016-07-10 09:51:57 -04:00
parent efa5f6a75f
commit f663382363
2 changed files with 2 additions and 1 deletions

View file

@ -190,6 +190,7 @@ public class ArduinoLibrary {
public Path getInstallPath() { public Path getInstallPath() {
return installPath == null return installPath == null
? ArduinoPreferences.getArduinoHome().resolve("libraries").resolve(name.replaceAll("[ ()]", "_")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ? ArduinoPreferences.getArduinoHome().resolve("libraries").resolve(name.replaceAll("[ ()]", "_")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
.resolve(version)
: installPath; : installPath;
} }

View file

@ -379,7 +379,7 @@ public class ArduinoManager {
Path librariesDir = ArduinoPreferences.getArduinoHome().resolve("libraries"); //$NON-NLS-1$ Path librariesDir = ArduinoPreferences.getArduinoHome().resolve("libraries"); //$NON-NLS-1$
if (Files.isDirectory(librariesDir)) { if (Files.isDirectory(librariesDir)) {
try { try {
Files.find(librariesDir, 2, Files.find(librariesDir, 3,
(path, attrs) -> path.getFileName().toString().equals("library.properties")) //$NON-NLS-1$ (path, attrs) -> path.getFileName().toString().equals("library.properties")) //$NON-NLS-1$
.forEach(path -> { .forEach(path -> {
try { try {