summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-10-01 17:20:47 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-10-02 12:45:52 +0200
commit4adc78b78b3f6a659d79eaf17dff3ae5d7f79db7 (patch)
treed6a57a662a0f3d1ef6701ea6b1873f7cf420f54c /apps/files_sharing/js
parent40dd2d9dbe4a732669bd85bfb56ba09054d5dd00 (diff)
downloadnextcloud-server-4adc78b78b3f6a659d79eaf17dff3ae5d7f79db7.tar.gz
nextcloud-server-4adc78b78b3f6a659d79eaf17dff3ae5d7f79db7.zip
Fix and extend unit tests
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/sharedfilelist.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 84a628345dd..2e798a92578 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -151,6 +151,9 @@
},
});
promises.push(remoteShares);
+ } else {
+ //Push empty promise so callback gets called the same way
+ promises.push($.Deferred().resolve());
}
this._reloadCall = $.when.apply($, promises);
@@ -174,7 +177,7 @@
// TODO: error handling
}
- if (remoteShares[0].ocs && remoteShares[0].ocs.data) {
+ if (remoteShares && remoteShares[0].ocs && remoteShares[0].ocs.data) {
files = files.concat(this._makeFilesFromRemoteShares(remoteShares[0].ocs.data));
} else {
// TODO: error handling
@@ -193,11 +196,12 @@
var file = {
shareOwner: share.owner + '@' + share.remote.replace(/.*?:\/\//g, ""),
name: OC.basename(share.mountpoint),
- mtime: share.mtime,
+ mtime: share.mtime * 1000,
mimetype: share.mimetype,
type: share.type,
id: share.file_id,
- path: OC.dirname(share.mountpoint)
+ path: OC.dirname(share.mountpoint),
+ permissions: share.permissions
};
file.shares = [{