Login | Register
My pages Projects Community openCollabNet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Catacomb] Copy resource question



Hi,All!
I'm just looking on the query:
SELECT 0, 
concat(?, SUBSTRING(URI,?)), creationdate,
displayname, getcontentlanguage,
getcontentlength,getcontenttype,
getetag,getlastmodified,resourcetype,
source,depth + ?, 
istext, isexternal, textcontent, bincontent, 
0+0, -1, -1+0 FROM dasl_resource 
WHERE URI=? or URI like ? '/%'

It's about copy directory with children in dbms.c .			

Passing	strlen(r_src->uri) + 1 as a second parameter
seems very strange to me.
Suppose, I want to copy '/dav/A/B' and descendants of
folder "B" to '/dav/C' . The query above returns me
all records about descendants,yes, but first record
will contain empty URI instead of "B". Others will
contain '/file1','/file2',... etc. instead of
'B/file1','B/file2',...
Keeping in mind that directory "B" doesn't exist under
the target path '/dav/C' - 
maybe you should pass something like
strlen(r_src->parent->uri)+1 , not strlen(r_src->uri)
+ 1 ?

Regards,
Andrew. 		

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com