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)
|
fmt.Printf("COPY %s\n", subPath)
|
||||||
|
|
||||||
//debug point
|
//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")
|
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.
|
//copy srcMatter to destMatter. invoker must handled the overwrite and lock.
|
||||||
func (this *MatterService) copy(request *http.Request, srcMatter *Matter, destDirMatter *Matter, name string) {
|
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 {
|
if srcMatter.Dir {
|
||||||
|
|
||||||
newMatter := &Matter{
|
newMatter := &Matter{
|
||||||
@ -687,6 +689,9 @@ func (this *MatterService) copy(request *http.Request, srcMatter *Matter, destDi
|
|||||||
|
|
||||||
newMatter = this.matterDao.Create(newMatter)
|
newMatter = this.matterDao.Create(newMatter)
|
||||||
|
|
||||||
|
//make the dir
|
||||||
|
util.MakeDirAll(newMatter.AbsolutePath())
|
||||||
|
|
||||||
//copy children
|
//copy children
|
||||||
matters := this.matterDao.FindByPuuidAndUserUuid(srcMatter.Uuid, srcMatter.UserUuid, nil)
|
matters := this.matterDao.FindByPuuidAndUserUuid(srcMatter.Uuid, srcMatter.UserUuid, nil)
|
||||||
for _, m := range matters {
|
for _, m := range matters {
|
||||||
|
Loading…
Reference in New Issue
Block a user