[Swift-commit] r6682 - in trunk/src/org/griphyn/vdl: karajan/lib mapping

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Mon Jul 29 15:46:09 CDT 2013


Author: hategan
Date: 2013-07-29 15:46:09 -0500 (Mon, 29 Jul 2013)
New Revision: 6682

Modified:
   trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java
   trunk/src/org/griphyn/vdl/mapping/AbsFile.java
Log:
fixed problems introduced by last few commits

Modified: trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java	2013-07-29 20:22:35 UTC (rev 6681)
+++ trunk/src/org/griphyn/vdl/karajan/lib/PathUtils.java	2013-07-29 20:46:09 UTC (rev 6682)
@@ -40,7 +40,13 @@
 
         @Override
         public Object function(Stack stack) {
-            return new AbsFile(path.getValue(stack)).getDirectory();
+            String dir = new AbsFile(path.getValue(stack)).getDirectory();
+            if (dir == null) {
+                return ".";
+            }
+            else {
+                return dir;
+            }
         }
     }
     
@@ -59,7 +65,7 @@
                 return remotePathName(dir);
             }
             else {
-                return null;
+                return "";
             }
         }
     }

Modified: trunk/src/org/griphyn/vdl/mapping/AbsFile.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/AbsFile.java	2013-07-29 20:22:35 UTC (rev 6681)
+++ trunk/src/org/griphyn/vdl/mapping/AbsFile.java	2013-07-29 20:46:09 UTC (rev 6682)
@@ -45,7 +45,7 @@
 	}
 	
 	public AbsFile(String protocol, String host, int port, String dir, String name) {
-        super(protocol, host, port, dir, name);    
+        super(protocol, host, port, dir, name); 
     }
 
     public AbsFile(String protocol, String host, int port, String path) {
@@ -62,7 +62,7 @@
             setHost("localhost");
         }
     }
-
+    
     protected FileResource getFileResource() throws IOException {
 		Service s = new ServiceImpl();
 		s.setProvider(getProtocol());




More information about the Swift-commit mailing list