Merge branch 'master' into 13804-no-shutdown-wanted-nodes
[arvados.git] / sdk / go / arvados / fs_base.go
index fa43cca0fab610f1ebf09a26f827792e538ffb27..3058a7609c6665dfd22c2ee6bb205685c97afe7d 100644 (file)
@@ -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, "/")
+}