X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b29442ebd118d522f9be9508f5111f2a68eae1a4..81b8420a261a095a269a46d965b2fc0ee6ecf793:/sdk/go/arvados/fs_base.go diff --git a/sdk/go/arvados/fs_base.go b/sdk/go/arvados/fs_base.go index fa43cca0fa..3058a7609c 100644 --- a/sdk/go/arvados/fs_base.go +++ b/sdk/go/arvados/fs_base.go @@ -452,7 +452,7 @@ func (fs *fileSystem) Rename(oldname, newname string) error { // call nca.FS().Rename() instead of proceeding. Until then // it's awkward for filesystems to implement their own Rename // methods effectively: the only one that runs is the one on - // the root filesystem exposed to the caller (webdav, fuse, + // the root FileSystem exposed to the caller (webdav, fuse, // etc). // When acquiring locks on multiple inodes, avoid deadlock by @@ -589,3 +589,7 @@ func rlookup(start inode, path string) (node inode, err error) { } return } + +func permittedName(name string) bool { + return name != "" && name != "." && name != ".." && !strings.Contains(name, "/") +}