Fix the error of copy.
This commit is contained in:
parent
bea9a0a56d
commit
eb89807cf1
@ -416,7 +416,7 @@ func (this *DavService) HandleCopy(writer http.ResponseWriter, request *http.Req
|
||||
fmt.Printf("COPY %s\n", subPath)
|
||||
|
||||
//debug point
|
||||
if request.Header.Get("X-Litmus") == "copymove: 5 (copy_nodestcoll)" {
|
||||
if request.Header.Get("X-Litmus") == "copymove: 7 (copy_coll)" {
|
||||
fmt.Println("stop here")
|
||||
}
|
||||
|
||||
|
@ -671,6 +671,8 @@ func (this *MatterService) AtomicMoveBatch(request *http.Request, srcMatters []*
|
||||
//copy srcMatter to destMatter. invoker must handled the overwrite and lock.
|
||||
func (this *MatterService) copy(request *http.Request, srcMatter *Matter, destDirMatter *Matter, name string) {
|
||||
|
||||
this.logger.Info("copy srcPath = %s destPath = %s/%s", srcMatter.Path, destDirMatter.Path, name)
|
||||
|
||||
if srcMatter.Dir {
|
||||
|
||||
newMatter := &Matter{
|
||||
@ -687,6 +689,9 @@ func (this *MatterService) copy(request *http.Request, srcMatter *Matter, destDi
|
||||
|
||||
newMatter = this.matterDao.Create(newMatter)
|
||||
|
||||
//make the dir
|
||||
util.MakeDirAll(newMatter.AbsolutePath())
|
||||
|
||||
//copy children
|
||||
matters := this.matterDao.FindByPuuidAndUserUuid(srcMatter.Uuid, srcMatter.UserUuid, nil)
|
||||
for _, m := range matters {
|
||||
|
Loading…
Reference in New Issue
Block a user