1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

touch: fix issue where directory is created instead of file

Detected on ftp, sftp and Dropbox backends.

Fixes #5952
This commit is contained in:
albertony
2022-01-27 19:46:53 +01:00
parent bd6d36b3f6
commit 07f53aebdc
4 changed files with 53 additions and 19 deletions

View File

@@ -1636,7 +1636,7 @@ func TestTouchDir(t *testing.T) {
r.CheckRemoteItems(t, file1, file2, file3)
timeValue := time.Date(2010, 9, 8, 7, 6, 5, 4, time.UTC)
err := operations.TouchDir(ctx, r.Fremote, timeValue, true)
err := operations.TouchDir(ctx, r.Fremote, "", timeValue, true)
require.NoError(t, err)
if accounting.Stats(ctx).GetErrors() != 0 {
err = accounting.Stats(ctx).GetLastError()