mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
EventManager: check the parent directory before creating a zip
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -2017,6 +2017,8 @@ func TestEstimateZipSizeErrors(t *testing.T) {
|
||||
err = os.MkdirAll(u.GetHomeDir(), os.ModePerm)
|
||||
assert.NoError(t, err)
|
||||
conn := NewBaseConnection("", ProtocolFTP, "", "", u)
|
||||
_, _, _, _, err = getFileWriter(conn, "/missing/path/file.txt", -1) //nolint:dogsled
|
||||
assert.Error(t, err)
|
||||
_, err = getSizeForPath(conn, "/missing", vfs.NewFileInfo("missing", true, 0, time.Now(), false))
|
||||
assert.True(t, conn.IsNotExistError(err))
|
||||
if runtime.GOOS != osWindows {
|
||||
|
||||
Reference in New Issue
Block a user