Explorar el Código

Use .equals instead of !=

This code never worked as intended. Please consider adding unit tests.
Lukas Reschke hace 9 años
padre
commit
ba58257627
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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());
             }