File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1111 var DELETED_REGEXP = new RegExp ( / ^ ( .+ ) \. d [ 0 - 9 ] + $ / ) ;
1212 var FILENAME_PROP = '{http://nextcloud.org/ns}trashbin-filename' ;
1313 var DELETION_TIME_PROP = '{http://nextcloud.org/ns}trashbin-deletion-time' ;
14+ var TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location' ;
1415
1516 /**
1617 * Convert a file name in the format filename.d12345 to the real file name.
5455 initialize : function ( ) {
5556 this . client . addFileInfoParser ( function ( response , data ) {
5657 var props = response . propStat [ 0 ] . properties ;
58+ var path = props [ TRASHBIN_ORIGINAL_LOCATION ] ;
5759 return {
5860 displayName : props [ FILENAME_PROP ] ,
5961 mtime : parseInt ( props [ DELETION_TIME_PROP ] , 10 ) * 1000 ,
6062 hasPreview : true ,
61- path : data . path . substr ( 6 ) , // remove leading /trash
63+ path : path ,
64+ extraData : path
6265 }
6366 } ) ;
6467
248251 * Returns list of webdav properties to request
249252 */
250253 _getWebdavProperties : function ( ) {
251- return [ FILENAME_PROP , DELETION_TIME_PROP ] . concat ( this . filesClient . getPropfindProperties ( ) ) ;
254+ return [ FILENAME_PROP , DELETION_TIME_PROP , TRASHBIN_ORIGINAL_LOCATION ] . concat ( this . filesClient . getPropfindProperties ( ) ) ;
252255 } ,
253256
254257 /**
You can’t perform that action at this time.
0 commit comments