From 764fb1058fba09f5c06ba48cd700ed417d0f73a4 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Tue, 4 Feb 2014 14:15:34 +0100 Subject: [PATCH] Fixed creation of shares without password --- .../lib/operations/remote/CreateShareRemoteOperation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java b/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java index 3e985da2..171e7d6f 100644 --- a/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java +++ b/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java @@ -113,7 +113,9 @@ public class CreateShareRemoteOperation extends RemoteOperation { post.addParameter(PARAM_SHARE_TYPE, Integer.toString(mShareType.getValue())); post.addParameter(PARAM_SHARE_WITH, mShareWith); post.addParameter(PARAM_PUBLIC_UPLOAD, Boolean.toString(mPublicUpload)); - post.addParameter(PARAM_PASSWORD, mPassword); + if (mPassword != null && mPassword.length() > 0) { + post.addParameter(PARAM_PASSWORD, mPassword); + } post.addParameter(PARAM_PERMISSIONS, Integer.toString(mPermissions)); status = client.executeMethod(post);