From: David A. Velasco Date: Thu, 22 Oct 2015 07:17:08 +0000 (+0200) Subject: Fixes from CR X-Git-Tag: oc-android-1.9^2~30^2~28 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/4d13b496317205ab475b5f3952ef2aea5a2818b5 Fixes from CR --- diff --git a/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java b/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java index 14490944..10af2722 100644 --- a/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java +++ b/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java @@ -116,7 +116,8 @@ public class CreateShareViaLinkOperation extends SyncOperation { public Intent getSendIntentWithSubject(Context context) { if (context != null && mSendIntent != null && mSendIntent.getStringExtra(Intent.EXTRA_SUBJECT) != null) { - if (getClient() == null || getClient().getCredentials().getUsername() == null) { + if (getClient() == null || getClient().getCredentials() == null || + getClient().getCredentials().getUsername() == null) { mSendIntent.putExtra( Intent.EXTRA_SUBJECT, context.getString(R.string.subject_shared_with_you, mFileName) diff --git a/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java b/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java index cb81ce46..861393cf 100644 --- a/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java +++ b/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java @@ -102,11 +102,7 @@ public class CreateShareWithShareeOperation extends SyncOperation { private void updateData(OCShare share) { // Update DB with the response share.setPath(mPath); - if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) { - share.setIsFolder(true); - } else { - share.setIsFolder(false); - } + share.setIsFolder(mPath.endsWith(FileUtils.PATH_SEPARATOR)); share.setPermissions(READ_ONLY); getStorageManager().saveShare(share);