Reverted previous change for objects that end with /. It caused problems in the folde...
authorChristos Stathis <chstath@ebs.gr>
Tue, 10 Jan 2012 13:44:51 +0000 (15:44 +0200)
committerChristos Stathis <chstath@ebs.gr>
Tue, 10 Jan 2012 13:44:51 +0000 (15:44 +0200)
src/gr/grnet/pithos/web/client/foldertree/Folder.java

index 7000fc1..509450c 100644 (file)
@@ -202,20 +202,13 @@ public class Folder extends Resource {
             path = unmarshallString(o, "name");
             lastModified = unmarshallDate(o, "last_modified");
         }
-        //Strip the last / if exists in order to determine the name, but remember to put it back
-        boolean endsWithSlash = false;
         if (path.endsWith("/")) {
             path = path.substring(0, path.length() - 1);
-            endsWithSlash = true;
         }
         if (path.contains("/"))
             name = path.substring(path.lastIndexOf("/") + 1, path.length()); //strip the prefix
         else
             name = path;
-        if (endsWithSlash) {
-               path += "/";
-               name += "/";
-        }
         if (aContainer != null) {
             container = aContainer;
             prefix = path;