diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-13 08:37:06 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-13 08:37:06 +0000 |
commit | f5b6ef1b65bdf99ac31d23c80ead330da2cd1411 (patch) | |
tree | 9b7c004bbdbd463b4bce97732294ee09150ed639 | |
parent | 3faee01c7c49c92eb6859bea19479e88b446e54e (diff) | |
download | samba-f5b6ef1b65bdf99ac31d23c80ead330da2cd1411.tar.gz samba-f5b6ef1b65bdf99ac31d23c80ead330da2cd1411.tar.bz2 samba-f5b6ef1b65bdf99ac31d23c80ead330da2cd1411.zip |
fix directory listing on win9x.
it turns out this is tricky to get right for both win9x and w2k with
and without unicode. This patch seems to do the trick.
(This used to be commit 01ebe5fff2b3cb29f083afb224b1257364ac5d80)
-rw-r--r-- | source3/libsmb/clilist.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 8b28e05a47..17a759f9e3 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -54,10 +54,14 @@ static int interpret_long_filename(struct cli_state *cli, len = CVAL(p, 26); p += 27; p += clistr_align_in(cli, p, 0); + /* the len+2 below looks strange but it is + important to cope with the differences + between win2000 and win9x for this call + (tridge) */ p += clistr_pull(cli, finfo->name, p, - sizeof(finfo->name), - len, - STR_TERMINATE); + sizeof(finfo->name), + len+2, + STR_TERMINATE); return PTR_DIFF(p, base); case 2: /* this is what OS/2 uses mostly */ |