Skip to content
Snippets Groups Projects
Commit 831ddd71 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

When FileBase.update() is called with readd_always=true, update date-added

The use from addfiles.js (the -readd option) implies this is what's expected.
And echicken was suprised the 'added' date/time-stamp wasn't udpated.
parent 0dbd3f06
No related branches found
No related tags found
No related merge requests found
......@@ -1311,6 +1311,8 @@ js_update_file(JSContext *cx, uintN argc, jsval *arglist)
p->smb_result = smb_putfile(&p->smb, &file);
else {
if((p->smb_result = smb_removefile(&p->smb, &file)) == SMB_SUCCESS) {
if(readd_always)
file.hdr.when_imported.time = 0; // we want the file to appear as "new"
p->smb_result = smb_addfile(&p->smb, &file, SMB_SELFPACK, extdesc, auxdata, newfname);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment