-
- // Update DB with the response
- if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
- share.setPath(mPath.substring(0, mPath.length()-1));
- share.setIsFolder(true);
-
- } else {
- share.setPath(mPath);
- 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());
-
- }
- }