Retry forbidden share adding a password only if the value of 'enforce password' optio...
authorDavid A. Velasco <dvelasco@solidgear.es>
Tue, 24 Nov 2015 16:15:20 +0000 (17:15 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Wed, 25 Nov 2015 08:32:35 +0000 (09:32 +0100)
src/com/owncloud/android/ui/activity/FileActivity.java

index 241f6e7..086f390 100644 (file)
@@ -801,7 +801,7 @@ public class FileActivity extends AppCompatActivity
             if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
                 String password = operation.getPassword();
                 if ((password == null || password.length() == 0) &&
             if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
                 String password = operation.getPassword();
                 if ((password == null || password.length() == 0) &&
-                    !getCapabilities().getFilesSharingPublicEnabled().isFalse())
+                    getCapabilities().getFilesSharingPublicEnabled().isUnknown())
                     {
                     // Was tried without password, but not sure that it's optional. Try with password.
                     // Try with password before giving up.
                     {
                     // Was tried without password, but not sure that it's optional. Try with password.
                     // Try with password before giving up.