cache file presence does not matter (fixing #215291 Code model cache should be relocatable)
1.1 --- a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/MakeProject.java Wed Sep 12 12:50:29 2012 +0400
1.2 +++ b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/MakeProject.java Wed Sep 12 12:52:42 2012 +0400
1.3 @@ -398,19 +398,15 @@
1.4 if (location != null) {
1.5 return location;
1.6 }
1.7 - try {
1.8 + if (DebugUtils.getBoolean("cnd.cache.in.project", false)) { //NOI18N
1.9 FileObject projectDirectory = helper.getProjectDirectory();
1.10 - if (CndFileUtils.isLocalFileSystem(projectDirectory.getFileSystem())) {
1.11 + if (CndFileUtils.isLocalFileSystem(projectDirectory)) {
1.12 File cache = new File(projectDirectory.getPath() + "/nbproject/private/cache/model"); //NOI18N
1.13 - if (DebugUtils.getBoolean("cnd.cache.in.project", false)) {
1.14 - cache.mkdirs();
1.15 - }
1.16 + cache.mkdirs();
1.17 if (cache.exists()) {
1.18 return new CacheLocation(cache);
1.19 }
1.20 }
1.21 - } catch (FileStateInvalidException ex) {
1.22 - Exceptions.printStackTrace(ex);
1.23 }
1.24 return CacheLocation.DEFAULT;
1.25 }