projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git]
/
services
/
keep-web
/
webdav.go
diff --git
a/services/keep-web/webdav.go
b/services/keep-web/webdav.go
index 5b23c9c5fa9f10bffec55d48e6950fd0ac76d639..501c355a7388a53fe3b40fc3f082c63768665620 100644
(file)
--- a/
services/keep-web/webdav.go
+++ b/
services/keep-web/webdav.go
@@
-2,7
+2,7
@@
//
// SPDX-License-Identifier: AGPL-3.0
//
// SPDX-License-Identifier: AGPL-3.0
-package
main
+package
keepweb
import (
"crypto/rand"
import (
"crypto/rand"
@@
-16,7
+16,7
@@
import (
"sync/atomic"
"time"
"sync/atomic"
"time"
- "git.
curoverse.com
/arvados.git/sdk/go/arvados"
+ "git.
arvados.org
/arvados.git/sdk/go/arvados"
"golang.org/x/net/context"
"golang.org/x/net/webdav"
"golang.org/x/net/context"
"golang.org/x/net/webdav"
@@
-100,6
+100,11
@@
func (fs *webdavFS) Rename(ctx context.Context, oldName, newName string) error {
if !fs.writing {
return errReadOnly
}
if !fs.writing {
return errReadOnly
}
+ if strings.HasSuffix(oldName, "/") {
+ // WebDAV "MOVE foo/ bar/" means rename foo to bar.
+ oldName = oldName[:len(oldName)-1]
+ newName = strings.TrimSuffix(newName, "/")
+ }
fs.makeparents(newName)
return fs.collfs.Rename(oldName, newName)
}
fs.makeparents(newName)
return fs.collfs.Rename(oldName, newName)
}