Skip to content

Commit

Permalink
Merge pull request #2548 from nextcloud/lastindexof_performance
Browse files Browse the repository at this point in the history
datamodel: String function use should be optimized for single characters
  • Loading branch information
AndyScherzinger authored May 4, 2018
2 parents 6047604 + 3a01e07 commit 4ce3900
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ public void updateAutoUploadPaths(Context context) {
if (!new File(syncedFolder.getLocalPath()).exists()) {
String localPath = syncedFolder.getLocalPath();
if (localPath.endsWith("/")) {
localPath = localPath.substring(0, localPath.lastIndexOf("/"));
localPath = localPath.substring(0, localPath.lastIndexOf('/'));
}
localPath = localPath.substring(0, localPath.lastIndexOf("/"));
localPath = localPath.substring(0, localPath.lastIndexOf('/'));
if (new File(localPath).exists()) {
syncedFolders.get(i).setLocalPath(localPath);
updateSyncFolder(syncedFolder);
Expand Down

0 comments on commit 4ce3900

Please sign in to comment.