touch: fix recursive touch due to recently introduced error ErrorIsDir

This commit is contained in:
albertony 2021-10-21 18:22:58 +02:00
parent a70c20fe6b
commit 9c8c0a58b5
2 changed files with 41 additions and 1 deletions

View file

@ -132,7 +132,7 @@ func Touch(ctx context.Context, f fs.Fs, fileName string) error {
return errors.Wrap(err, "failed to touch (create)")
}
}
if errors.Cause(err) == fs.ErrorNotAFile {
if errors.Cause(err) == fs.ErrorIsDir {
if recursive {
// Touch existing directory, recursive
fs.Debugf(nil, "Touching files in directory recursively")