mod_webdav: Delete old properties before updating new for MOVE (fixes #1317)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2630 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.24
Stefan Bühler 13 years ago
parent cef23f08d3
commit a55f82a392
  1. 19
      src/mod_webdav.c

@ -1980,8 +1980,25 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
if (0 == rename(con->physical.path->ptr, p->physical.path->ptr)) {
#ifdef USE_PROPPATCH
sqlite3_stmt *stmt = p->conf.stmt_move_uri;
sqlite3_stmt *stmt;
stmt = p->conf.stmt_delete_uri;
if (stmt) {
sqlite3_reset(stmt);
/* bind the values to the insert */
sqlite3_bind_text(stmt, 1,
con->uri.path->ptr,
con->uri.path->used - 1,
SQLITE_TRANSIENT);
if (SQLITE_DONE != sqlite3_step(stmt)) {
log_error_write(srv, __FILE__, __LINE__, "ss", "sql-move(delete old) failed:", sqlite3_errmsg(p->conf.sql));
}
}
stmt = p->conf.stmt_move_uri;
if (stmt) {
sqlite3_reset(stmt);

Loading…
Cancel
Save