Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Belle2020-04-21 17:23:40 +0000
committerJan Belle2020-04-21 17:23:40 +0000
commitee82858c0b96598ac48ad4ef4b9d4ff005264bc9 (patch)
tree3f62d795fb7bb18f36aa6f7a213a32b838a89eaa
parent9ed5eb37500a9270c93d8aa4f0b064e7fb12a941 (diff)
downloadorg.eclipse.etrice-ee82858c0b96598ac48ad4ef4b9d4ff005264bc9.tar.gz
org.eclipse.etrice-ee82858c0b96598ac48ad4ef4b9d4ff005264bc9.tar.xz
org.eclipse.etrice-ee82858c0b96598ac48ad4ef4b9d4ff005264bc9.zip
[generator] Fix uri to file path conversion
-rw-r--r--plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/io/FileSystemModelPath.java7
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/build.gradle1
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/io/FileSystemModelPath.java b/plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/io/FileSystemModelPath.java
index c1e9def7e..42705cf10 100644
--- a/plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/io/FileSystemModelPath.java
+++ b/plugins/org.eclipse.etrice.generator.base/src/org/eclipse/etrice/generator/base/io/FileSystemModelPath.java
@@ -180,10 +180,11 @@ public class FileSystemModelPath implements IModelPath {
if(uri.isFile()) {
/*
* If the authority of the uri is non-empty,
- * URI.toFileString produces an invalid file string that can't be parsed by Paths.get.
- * So we create the path directly from the device and segments of the uri.
+ * URI.toFileString produces a file string containing the authority that can't be parsed by Paths.get.
+ * So we create the path directly from the device and segments of the uri and convert it to an absolute path if necessary.
*/
- return Optional.of(Paths.get(uri.hasDevice() ? uri.device() : "", uri.segments()));
+ Path path = Paths.get(uri.hasDevice() ? uri.device() : "", uri.segments());
+ return Optional.of(uri.hasAbsolutePath() ? path.toAbsolutePath() : path);
}
return Optional.empty();
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/build.gradle b/runtime/org.eclipse.etrice.runtime.c/build.gradle
index 37ea5063c..40d9790b7 100644
--- a/runtime/org.eclipse.etrice.runtime.c/build.gradle
+++ b/runtime/org.eclipse.etrice.runtime.c/build.gradle
@@ -32,7 +32,6 @@ model {
}
zipSource {
- def srcDirs =
from(['src/common', 'src/config', 'src/util']) {
into 'src'
}

Back to the top