Эх сурвалжийг харах

no path magic, but simply use parent id

Signed-off-by: tobiaskaminsky <tobias@kaminsky.me>
tobiaskaminsky 7 жил өмнө
parent
commit
55df66377f

+ 1 - 2
src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java

@@ -145,8 +145,7 @@ public class PreviewImageActivity extends FileActivity implements
                 filename = getFile().getFileName();
             }
             // get parent from path
-            String parentPath = getFile().getRemotePath().substring(0, getFile().getRemotePath().lastIndexOf(filename));
-            OCFile parentFolder = getStorageManager().getFileByPath(parentPath);
+            OCFile parentFolder = getStorageManager().getFileById(getFile().getParentId());
 
             if (parentFolder == null) {
                 // should not be necessary