aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/anarres/cpp/JavaFileSystem.java
diff options
context:
space:
mode:
authorShevek <[email protected]>2009-03-31 13:15:12 +0000
committerShevek <[email protected]>2009-03-31 13:15:12 +0000
commit5b560840be18a2920f77752925f0882fabe6422c (patch)
tree68f49f13857ec7c492411ea1d1c416044900bc28 /src/java/org/anarres/cpp/JavaFileSystem.java
parent15ab0955dd6da2ff0bdad791b190a93039e8edbd (diff)
Fix comments in macros. Fix EOF killing jcpp. Allow macros after whitespace.
Diffstat (limited to 'src/java/org/anarres/cpp/JavaFileSystem.java')
-rw-r--r--src/java/org/anarres/cpp/JavaFileSystem.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/java/org/anarres/cpp/JavaFileSystem.java b/src/java/org/anarres/cpp/JavaFileSystem.java
index fab7721..83a5caa 100644
--- a/src/java/org/anarres/cpp/JavaFileSystem.java
+++ b/src/java/org/anarres/cpp/JavaFileSystem.java
@@ -55,7 +55,16 @@ public class JavaFileSystem implements VirtualFileSystem {
@Override
public JavaFile getParentFile() {
- return new JavaFile(getParent());
+ String parent = getParent();
+ if (parent != null)
+ return new JavaFile(parent);
+ File absolute = getAbsoluteFile();
+ parent = absolute.getParent();
+ /*
+ if (parent == null)
+ return null;
+ */
+ return new JavaFile(parent);
}
public JavaFile getChildFile(String name) {