You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2006/07/21 12:49:23 UTC
svn commit: r424261 -
/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/moduleloader/DirectoryContent.java
Author: rickhall
Date: Fri Jul 21 03:49:23 2006
New Revision: 424261
URL: http://svn.apache.org/viewvc?rev=424261&view=rev
Log:
Slight bug fix to deal with Windows path separator.
Modified:
incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/moduleloader/DirectoryContent.java
Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/moduleloader/DirectoryContent.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/moduleloader/DirectoryContent.java?rev=424261&r1=424260&r2=424261&view=diff
==============================================================================
--- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/moduleloader/DirectoryContent.java (original)
+++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/moduleloader/DirectoryContent.java Fri Jul 21 03:49:23 2006
@@ -171,10 +171,13 @@
throw new NoSuchElementException("No more entry paths.");
}
+ // Convert the file separator character to slashes.
+ String abs = m_children[m_counter].getAbsolutePath()
+ .replace(File.separatorChar, '/');
+
// Remove the leading path of the reference directory, since the
// entry paths are supposed to be relative to the root.
-// TODO: ML - Under Windows we will have to deal with drive letters, I think.
- StringBuffer sb = new StringBuffer(m_children[m_counter].getAbsolutePath());
+ StringBuffer sb = new StringBuffer(abs);
sb.delete(0, m_dir.getAbsolutePath().length() + 1);
// Add a '/' to the end of directory entries.
if (m_children[m_counter].isDirectory())