projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added listAll utility function which will always fetch all resources.
[arvados.git]
/
sdk
/
go
/
arvados
/
collection_fs.go
diff --git
a/sdk/go/arvados/collection_fs.go
b/sdk/go/arvados/collection_fs.go
index 28629e33b20f31189ac460d02ab2868fdd85db96..d8ee2a2b1c5175697bf39369274ff6c0a42e7310 100644
(file)
--- a/
sdk/go/arvados/collection_fs.go
+++ b/
sdk/go/arvados/collection_fs.go
@@
-864,7
+864,7
@@
func (dn *dirnode) loadManifest(txt string) error {
return fmt.Errorf("line %d: bad locator %q", lineno, token)
}
return fmt.Errorf("line %d: bad locator %q", lineno, token)
}
- toks := strings.Split
(token, ":"
)
+ toks := strings.Split
N(token, ":", 3
)
if len(toks) != 3 {
return fmt.Errorf("line %d: bad file segment %q", lineno, token)
}
if len(toks) != 3 {
return fmt.Errorf("line %d: bad file segment %q", lineno, token)
}
@@
-1078,6
+1078,10
@@
func (dn *dirnode) Rename(oldname, newname string) error {
if !ok {
return os.ErrNotExist
}
if !ok {
return os.ErrNotExist
}
+ if locked[oldinode] {
+ // oldinode cannot become a descendant of itself.
+ return ErrInvalidArgument
+ }
if existing, ok := newdn.inodes[newname]; ok {
// overwriting an existing file or dir
if dn, ok := existing.(*dirnode); ok {
if existing, ok := newdn.inodes[newname]; ok {
// overwriting an existing file or dir
if dn, ok := existing.(*dirnode); ok {