Browse Source

Merge pull request #3818 from nextcloud/filedatastoragemanager-string-comparison

datamodel: use equals for string comparison.
Tobias Kaminsky 6 years ago
parent
commit
caf89285eb

+ 1 - 1
scripts/analysis/findbugs-results.txt

@@ -1 +1 @@
-473
+472

+ 1 - 1
src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

@@ -1471,7 +1471,7 @@ public class FileDataStorageManager {
         // Reset flags & Remove shares for this files
         String filePath = "";
         for (OCShare share : shares) {
-            if (filePath != share.getPath()) {
+            if (!filePath.equals(share.getPath())) {
                 filePath = share.getPath();
                 resetShareFlagInAFile(filePath);
                 operations = prepareRemoveSharesInFile(filePath, operations);