+
+ 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.setPermissions(mPermissions);
+
+ getStorageManager().saveShare(share);
+
+ // Update OCFile with data from share: ShareByLink and publicLink
+ OCFile file = getStorageManager().getFileByPath(mPath);
+ if (file!=null) {
+ mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink());
+ file.setPublicLink(share.getShareLink());
+ file.setShareByLink(true);
+ getStorageManager().saveFile(file);
+ Log_OC.d(TAG, "Public Link = " + file.getPublicLink());
+
+ }
+ }