libsmb: info-level SMB2_FIND_POSIX_INFORMATION doesn't return short name
authorRalph Boehme <slow@samba.org>
Sun, 29 Oct 2023 13:49:20 +0000 (14:49 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 31 Oct 2023 04:38:42 +0000 (04:38 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
source3/libsmb/pylibsmb.c

index efaed925ff0d04ee50208ece96c8bddf1ae8fac1..00f7e010cf76a0170bd101d079cf72419ea6f993 100644 (file)
@@ -1892,12 +1892,10 @@ static NTSTATUS list_posix_helper(struct file_info *finfo,
        size = PyLong_FromUnsignedLongLong(finfo->size);
        /*
         * Build a dictionary representing the file info.
-        * Note: Windows does not always return short_name (so it may be None)
         */
-       file = Py_BuildValue("{s:s,s:i,s:s,s:O,s:l,s:i,s:i,s:i,s:s,s:s}",
+       file = Py_BuildValue("{s:s,s:i,s:O,s:l,s:i,s:i,s:i,s:s,s:s}",
                             "name", finfo->name,
                             "attrib", (int)finfo->attr,
-                            "short_name", finfo->short_name,
                             "size", size,
                             "mtime",
                             convert_timespec_to_time_t(finfo->mtime_ts),