mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
fix codacy
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
3ca95252c4
commit
159aacdd15
1 changed files with 3 additions and 3 deletions
|
@ -337,16 +337,16 @@ public class DocumentsStorageProvider extends DocumentsProvider {
|
||||||
@Override
|
@Override
|
||||||
public String copyDocument(String sourceDocumentId, String targetParentDocumentId) throws FileNotFoundException {
|
public String copyDocument(String sourceDocumentId, String targetParentDocumentId) throws FileNotFoundException {
|
||||||
long sourceId = Long.parseLong(sourceDocumentId);
|
long sourceId = Long.parseLong(sourceDocumentId);
|
||||||
long targetId = Long.parseLong(targetParentDocumentId);
|
|
||||||
updateCurrentStorageManagerIfNeeded(sourceId);
|
updateCurrentStorageManagerIfNeeded(sourceId);
|
||||||
|
|
||||||
OCFile file = currentStorageManager.getFileById(sourceId);
|
OCFile file = currentStorageManager.getFileById(sourceId);
|
||||||
OCFile targetFolder = currentStorageManager.getFileById(targetId);
|
|
||||||
|
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
throw new FileNotFoundException("File " + sourceDocumentId + " not found!");
|
throw new FileNotFoundException("File " + sourceDocumentId + " not found!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long targetId = Long.parseLong(targetParentDocumentId);
|
||||||
|
OCFile targetFolder = currentStorageManager.getFileById(targetId);
|
||||||
if (targetFolder == null) {
|
if (targetFolder == null) {
|
||||||
throw new FileNotFoundException("File " + targetParentDocumentId + " not found!");
|
throw new FileNotFoundException("File " + targetParentDocumentId + " not found!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue