From 508c580e67e8cdec45cd72bc7c34e60890e6576e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 23 Jun 2016 11:50:59 +0200 Subject: Fix trashed file name corruption when rerendering trashbin list The trashbin code does some gymnastics with the file data at render time. This fix makes sure that the modifications done on the file data are only local to the rendering code and doesn't affect the actual file data from the file list. --- apps/files_trashbin/js/filelist.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/files_trashbin/js') diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js index feed28d8fc7..510ab2c21bc 100644 --- a/apps/files_trashbin/js/filelist.js +++ b/apps/files_trashbin/js/filelist.js @@ -93,6 +93,8 @@ _renderRow: function(fileData, options) { options = options || {}; + // make a copy to avoid changing original object + fileData = _.extend({}, fileData); var dir = this.getCurrentDirectory(); var dirListing = dir !== '' && dir !== '/'; // show deleted time as mtime -- cgit v1.2.3