Branch: Tag:

2018-03-20

2018-03-20 15:47:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

WebDAV: Fixed MOVE of directories containing locked files.

Fixes some more of [WS-168].

1325:    return Roxen.http_status(403, "Permission denied.");    }    -  // FIXME: What about moving of directories containing locked files? +  // NB: Consider the case of moving of directories containing locked files.    if (mapping(string:mixed) ret = -  write_access(({ f, relative_from }), 0, id)) { +  write_access(({ f, relative_from }), 1, id)) {    TRACE_LEAVE("MV: Locked");    return ret;    }
1414:    return Roxen.http_status(403, "Permission denied.");    }    +  // NB: Consider the case of moving of directories containing locked files.    mapping(string:mixed) ret = -  write_access(({ combine_path(f, "../"), f, new_uri }), 0, id); +  write_access(({ combine_path(f, "../"), f, new_uri }), 1, id);    if (ret) {    TRACE_LEAVE("MOVE: Locked");    return ret;    }    -  size = _file_size(moveto,id); +  size = _file_size(new_uri, id);       SETUID_TRACE("Moving file", 0);