Browse Source

codacy

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 6 years ago
parent
commit
3bd8286807

+ 2 - 1
src/main/java/com/owncloud/android/providers/DocumentsStorageProvider.java

@@ -384,7 +384,7 @@ public class DocumentsStorageProvider extends DocumentsProvider {
     public String moveDocument(String sourceDocumentId, String sourceParentDocumentId, String targetParentDocumentId)
         throws FileNotFoundException {
         long sourceId = Long.parseLong(sourceDocumentId);
-        long targetId = Long.parseLong(targetParentDocumentId);
+
         updateCurrentStorageManagerIfNeeded(sourceId);
 
         OCFile file = currentStorageManager.getFileById(sourceId);
@@ -393,6 +393,7 @@ public class DocumentsStorageProvider extends DocumentsProvider {
             throw new FileNotFoundException("File " + sourceDocumentId + " not found!");
         }
 
+        long targetId = Long.parseLong(targetParentDocumentId);
         OCFile targetFolder = currentStorageManager.getFileById(targetId);
 
         if (targetFolder == null) {