Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phetta committed Nov 19, 2019
1 parent ce6b0fa commit cc2a9f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
Expand Down Expand Up @@ -1133,7 +1132,7 @@ private void requestUploadOfFilesFromFileSystem(List<File> files, int resultCode
remoteDirectory = filePath.replace(replicationStartDir, "");
}
String remotePath = remotePathBase + remoteDirectory;
String folder = remotePath.replace(remotePath.substring(remotePath.lastIndexOf("/")), "");
String folder = remotePath.replace(remotePath.substring(remotePath.lastIndexOf('/')), "");
if (file.isDirectory()) {
folder = remotePath;
}
Expand All @@ -1142,7 +1141,7 @@ private void requestUploadOfFilesFromFileSystem(List<File> files, int resultCode
remotePaths.add(remotePath);
}

if (folder.equals("")) {
if ("".equals(folder)) {
// Uploading to root so no folder creation needed
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import java.io.File;
import java.util.ArrayList;
import java.util.stream.Collectors;
import java.util.List;

/**
* Asynchronous task checking if there is space enough to copy all the files chosen to upload into the ownCloud local
Expand All @@ -43,7 +43,7 @@ public CheckAvailableSpaceTask(CheckAvailableSpaceListener callback, String... p
this.callback = callback;
}

public CheckAvailableSpaceTask(CheckAvailableSpaceListener callback, ArrayList<File> files) {
public CheckAvailableSpaceTask(CheckAvailableSpaceListener callback, List<File> files) {
ArrayList<String> paths = new ArrayList<>();
for (File file : files) {
paths.add(file.getAbsolutePath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;

Expand Down

0 comments on commit cc2a9f4

Please sign in to comment.