Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-17 12:24:36 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-17 12:24:36 +0300
commitfa983caeaa6d04456d63099d26c0be144e343ac3 (patch)
tree61093f90274a7c3e414c8f1469d1fa47d7b3853b /core
parenta7cd8103b5818e3e8638db5117a6a91af2257916 (diff)
parent181ba7b4e190a12a905bc602cbeaba655d382dab (diff)
Merge pull request #21238 from owncloud/files-fixparsewebdavmtime
Fix files UI mtime parsing from webdav
Diffstat (limited to 'core')
-rw-r--r--core/js/files/client.js2
-rw-r--r--core/js/tests/specs/files/clientSpec.js10
2 files changed, 6 insertions, 6 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js
index 608c2702fbb..8854ee0c809 100644
--- a/core/js/files/client.js
+++ b/core/js/files/client.js
@@ -253,7 +253,7 @@
id: props['{' + Client.NS_OWNCLOUD + '}fileid'],
path: OC.dirname(path) || '/',
name: OC.basename(path),
- mtime: new Date(props['{' + Client.NS_DAV + '}getlastmodified'])
+ mtime: (new Date(props['{' + Client.NS_DAV + '}getlastmodified'])).getTime()
};
var etagProp = props['{' + Client.NS_DAV + '}getetag'];
diff --git a/core/js/tests/specs/files/clientSpec.js b/core/js/tests/specs/files/clientSpec.js
index 3a3181d8426..61cff0a66ec 100644
--- a/core/js/tests/specs/files/clientSpec.js
+++ b/core/js/tests/specs/files/clientSpec.js
@@ -252,7 +252,7 @@ describe('OC.Files.Client tests', function() {
expect(info.name).toEqual('One.txt');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(250);
- expect(info.mtime.getTime()).toEqual(1436535485000);
+ expect(info.mtime).toEqual(1436535485000);
expect(info.mimetype).toEqual('text/plain');
expect(info.etag).toEqual('559fcabd79a38');
@@ -264,7 +264,7 @@ describe('OC.Files.Client tests', function() {
expect(info.name).toEqual('sub');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(100);
- expect(info.mtime.getTime()).toEqual(1436536800000);
+ expect(info.mtime).toEqual(1436536800000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('66cfcabd79abb');
});
@@ -295,7 +295,7 @@ describe('OC.Files.Client tests', function() {
expect(info.name).toEqual('文件夹');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(120);
- expect(info.mtime.getTime()).toEqual(1436522405000);
+ expect(info.mtime).toEqual(1436522405000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('56cfcabd79abb');
@@ -376,7 +376,7 @@ describe('OC.Files.Client tests', function() {
expect(info.name).toEqual('文件夹');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(120);
- expect(info.mtime.getTime()).toEqual(1436522405000);
+ expect(info.mtime).toEqual(1436522405000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('56cfcabd79abb');
});
@@ -425,7 +425,7 @@ describe('OC.Files.Client tests', function() {
expect(info.name).toEqual('in root');
expect(info.permissions).toEqual(31);
expect(info.size).toEqual(120);
- expect(info.mtime.getTime()).toEqual(1436522405000);
+ expect(info.mtime).toEqual(1436522405000);
expect(info.mimetype).toEqual('httpd/unix-directory');
expect(info.etag).toEqual('56cfcabd79abb');
});