s3:libsmb: interpret_long_filename() short_name is always UNICODE
authorStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 12:46:40 +0000 (14:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 12:46:40 +0000 (14:46 +0200)
metze

source3/libsmb/clilist.c

index 9eec97fbeb1f6bb376c87c5f54ff9ca1cce5acdd..0792e4057b1f479751b609bdfd1f482c543ce67a 100644 (file)
@@ -189,14 +189,9 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
                                return pdata_end - base;
                        }
                        p += 2;
-                       {
-                               /* stupid NT bugs. grr */
-                               int flags = 0;
-                               if (p[1] == 0 && namelen > 1) flags |= STR_UNICODE;
-                               clistr_pull(base_ptr, finfo->short_name, p,
-                                           sizeof(finfo->short_name),
-                                           slen, flags);
-                       }
+                       clistr_pull(base_ptr, finfo->short_name, p,
+                                   sizeof(finfo->short_name),
+                                   slen, STR_UNICODE);
                        p += 24; /* short name? */
                        if (p + namelen < p || p + namelen > pdata_end) {
                                return pdata_end - base;