Fixed update of right fragment when actions in the context menu of the left fragment...
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / RenameFileOperation.java
index fe7ad79..fd97c58 100644 (file)
@@ -86,7 +86,9 @@ public class RenameFileOperation extends RemoteOperation {
                 return new RemoteOperationResult(ResultCode.OK);
             }
         
-            newRemotePath = (new File(mFile.getRemotePath())).getParent() + mNewName;
+            String parent = (new File(mFile.getRemotePath())).getParent();
+            parent = (parent.endsWith(OCFile.PATH_SEPARATOR)) ? parent : parent + OCFile.PATH_SEPARATOR; 
+            newRemotePath =  parent + mNewName;
             
             // check if the new name is valid in the local file system
             if (!isValidNewName()) {