incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r923186 - /incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/DirectoryImpl.java
Date Mon, 15 Mar 2010 11:49:54 GMT
Author: ozzy
Date: Mon Mar 15 11:49:54 2010
New Revision: 923186

URL: http://svn.apache.org/viewvc?rev=923186&view=rev
Log:
ARIES-252 Fix FileImpl.getFile to return correct implementation class.

Modified:
    incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/DirectoryImpl.java

Modified: incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/DirectoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/DirectoryImpl.java?rev=923186&r1=923185&r2=923186&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/DirectoryImpl.java
(original)
+++ incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/DirectoryImpl.java
Mon Mar 15 11:49:54 2010
@@ -49,9 +49,14 @@ public class DirectoryImpl extends FileI
     File desiredFile = new File(file, name);
     IFile result = null;
     
-    if (desiredFile.exists()) {
-      result = new FileImpl(desiredFile, rootDirFile);
+    if (desiredFile.exists()) 
+    {
+        if(!desiredFile.isDirectory())
+          result = new FileImpl(desiredFile, rootDirFile);
+        else
+          result = new DirectoryImpl(desiredFile, rootDirFile);
     }
+    
     return result;
   }
 



Mime
View raw message