touch: fix recursive touch due to recently introduced error ErrorIsDir
This commit is contained in:
parent
a70c20fe6b
commit
9c8c0a58b5
2 changed files with 41 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue