summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/js/public.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 246b639f652..b3098f9dcdc 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -274,8 +274,12 @@ OCA.Sharing.PublicApp = {
_saveToOwnCloud: function (remote, token, owner, name, isProtected) {
var location = window.location.protocol + '//' + window.location.host + OC.webroot;
+
+ if(remote.substr(-1) !== '/') {
+ remote += '/'
+ };
- var url = remote + '/index.php/apps/files#' + 'remote=' + encodeURIComponent(location) // our location is the remote for the other server
+ var url = remote + 'index.php/apps/files#' + 'remote=' + encodeURIComponent(location) // our location is the remote for the other server
+ "&token=" + encodeURIComponent(token) + "&owner=" + encodeURIComponent(owner) + "&name=" + encodeURIComponent(name) + "&protected=" + isProtected;