mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
ftpd: add basic wildcard support
this is the minimal implementation to allow mget and similar commands with wildcards. We only support wildcard for the last path level, for example: - mget *.xml is supported - mget dir/*.xml is supported - mget */*.xml is not supported Removed . and .. from FTP directory listing Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -57,9 +57,9 @@ func TestBasicFTPHandlingCryptFs(t *testing.T) {
|
||||
}
|
||||
list, err := client.List(".")
|
||||
if assert.NoError(t, err) {
|
||||
assert.Len(t, list, 2)
|
||||
assert.Equal(t, ".", list[0].Name)
|
||||
assert.Equal(t, testFileSize, int64(list[1].Size))
|
||||
if assert.Len(t, list, 1) {
|
||||
assert.Equal(t, testFileSize, int64(list[0].Size))
|
||||
}
|
||||
}
|
||||
user, _, err = httpdtest.GetUserByUsername(user.Username, http.StatusOK)
|
||||
assert.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user