feat: Add tests for symlink behaviour of Rename

This commit is contained in:
Felicitas Pojtinger
2022-01-22 16:09:34 +01:00
parent 4e5c22ed8a
commit cd03215610
3 changed files with 199 additions and 44 deletions

View File

@@ -720,10 +720,24 @@ func (f *STFS) Rename(oldname, newname string) error {
)
if err != nil {
if err == sql.ErrNoRows {
return os.ErrNotExist
}
source, err = inventory.Stat(
f.metadata,
return err
oldname,
true,
f.onHeader,
)
if err != nil {
if err == sql.ErrNoRows {
return os.ErrNotExist
} else {
return err
}
}
} else {
return err
}
}
if _, err := inventory.Stat(