Bug #1317

move fails for properties when new file exists

Added by Anonymous over 6 years ago. Updated over 4 years ago.

Status:FixedStart date:
Priority:NormalDue date:
Assignee:jan% Done:

100%

Category:mod_webdav
Target version:1.4.24
Missing in 1.5.x:

Description

When performing a MOVE the properties database is adjusted with an )"UPDATE properites SET resource = "new" WHERE resource ="old"). This however fails if there is properties for the new file since there now would be two records with the exactly same columns and sqlite fails the call.

Now I do not know SQL that well, but I think that the UPDATE call should by prefixed with a ("DELETE FROM properties where resource="new"). This worked when I did it offline using the sqlite3 utility.

Besides failing when there is an new file, the current situation also means that we inherit the properties from the existing new file.

-- henrik.holst2

Associated revisions

Revision 2630
Added by stbuehler over 4 years ago

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

History

#1 Updated by HenrikHolst over 6 years ago

I have tested the patch against 1.5.x and it works so please consider this for inclusion for both 1.4.x and 1.5.x since MOVE operation without this patch fails horribly when there is metadata properties.

#2 Updated by stbuehler over 5 years ago

  • Target version changed from 1.4.20 to 1.4.21

#3 Updated by icy about 5 years ago

  • Target version changed from 1.4.21 to 1.4.22
  • Patch available set to No

#4 Updated by stbuehler about 5 years ago

  • Target version changed from 1.4.22 to 1.4.23

#5 Updated by stbuehler almost 5 years ago

  • Target version changed from 1.4.23 to 1.4.24

#6 Updated by stbuehler over 4 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2630.

Also available in: Atom