Browse Source

Use .equals instead of !=

This code never worked as intended. Please consider adding unit tests.
Lukas Reschke 9 years ago
parent
commit
ba58257627
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/com/owncloud/android/ui/activity/FileDisplayActivity.java

+ 1 - 1
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -271,7 +271,7 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
         mDirectories.clear();
         OCFile fileIt = file;
         String parentPath;
-        while(fileIt != null && fileIt.getFileName() != OCFile.ROOT_PATH) {
+        while(fileIt != null && !fileIt.getFileName().equals(OCFile.ROOT_PATH)) {
             if (fileIt.isFolder()) {
                 mDirectories.add(fileIt.getFileName());
             }