Skip to content

Commit

Permalink
Reverting Swift UFS changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimsa committed Jun 23, 2016
1 parent 027248a commit 65e578b
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -385,7 +385,8 @@ private boolean copy(String src, String dst) {
* @throws IOException if an error occurs listing the directory
*/
private boolean isDirectory(String path) throws IOException {
String[] children = listInternal(path, true);
String strippedPath = stripPrefixIfPresent(path);
String[] children = listInternal(strippedPath, true);
return children != null && children.length > 0;
}

Expand All @@ -406,11 +407,11 @@ private String[] listInternal(String path, boolean recursive) throws IOException
Directory directory = new Directory(path, '/');
Container c = mAccount.getContainer(mContainerName);
Collection<DirectoryOrObject> res = c.listDirectory(directory);
Set<String> children = new HashSet<>();
Set<String> children = new HashSet<String>();
Iterator<DirectoryOrObject> iter = res.iterator();
while (iter.hasNext()) {
DirectoryOrObject dirObj = iter.next();
String child = stripFolderSuffixIfPresent(dirObj.getName());
DirectoryOrObject dirobj = (DirectoryOrObject) iter.next();
String child = stripFolderSuffixIfPresent(dirobj.getName());
String noPrefix = stripPrefixIfPresent(child, path);
children.add(noPrefix);
}
Expand Down

0 comments on commit 65e578b

Please sign in to comment.