cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [28/32] cayenne git commit: Relativize problem fix
Date Wed, 14 Nov 2018 14:27:59 GMT
Relativize problem fix


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/c19f2358
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/c19f2358
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/c19f2358

Branch: refs/heads/master
Commit: c19f235874d345f440e254e789c53cf0cd6aaed1
Parents: 3225c39
Author: Arseni Bulatski <ancarseni@gmail.com>
Authored: Tue Nov 13 17:57:32 2018 +0300
Committer: Arseni Bulatski <ancarseni@gmail.com>
Committed: Tue Nov 13 17:57:32 2018 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/cayenne/gen/xml/CgenSaverDelegate.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/c19f2358/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenSaverDelegate.java
----------------------------------------------------------------------
diff --git a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenSaverDelegate.java
b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenSaverDelegate.java
index b31a8b0..92453c7 100644
--- a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenSaverDelegate.java
+++ b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/xml/CgenSaverDelegate.java
@@ -61,8 +61,8 @@ public class CgenSaverDelegate extends BaseSaverDelegate{
                 resourcePath = resourcePath.getParent();
             }
             cgenConfiguration.setRootPath(resourcePath);
-            if(prevPath != null && resourcePath.compareTo(prevPath) != 0) {
-                Path relPath = resourcePath.relativize(prevPath);
+            if(prevPath != null) {
+                Path relPath = resourcePath.relativize(prevPath).normalize();
                 cgenConfiguration.setRelPath(relPath);
             }
         }


Mime
View raw message