FindFirst / FindNext doesn't work well on samba-shares lazarus / 32-Linux ---------------------------------------------------------------------- papayawhip · 2014-02-26 10:41 Hi, i have a strange problem with FindFirst/FindNext on smb shares. If I mount a windows smb share with Quotemount -t and do a 'ls' command i found following files: Quotels -al /mnt/dicta/pool/ insgesamt 0 drwxr-xr-x 1 root root 0 Feb 26  2014 . drwxr-xr-x 1 root root 0 Sep 18 08:07 .. drwxr-xr-x 0 root root 0 Dez 16 07:07 ERL -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument - Kopie (2) - Kopie.txt -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument - Kopie (2).txt -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument - Kopie (3) - Kopie.txt -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument - Kopie (3).txt -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument - Kopie (4).txt -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument - Kopie - Kopie.txt -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument - Kopie.txt -rwxr-xr-x 0 root root 0 Feb 26  2014 Neues Textdokument.txt But if I parse this dir with TSearchRec I can't find all files. (The preimplemented TShellListView have this issue too.) My code: Code: [Select]if FindFirst(fLocalpath+'/*', faAnyFile, i) = 0 then   begin     repeat     begin       inc(x);       writeln(x, '-------------> ',i.name);       if ExtractFileExt(i.Name) = '.wav' then       begin         //       end;     end;     until FindNext(i) <> 0;   end;   FindClose(i); Output: Quote/mnt/dicta/pool/* 1-------------> . 2-------------> .. 3-------------> ERL 4-------------> Neues Textdokument - Kopie (2) - Kopie.txt 5-------------> Neues Textdokument - Kopie (2).txt 6-------------> Neues Textdokument - Kopie - Kopie.txt 7-------------> Neues Textdokument - Kopie.txt 8-------------> Neues Textdokument.txt Has anyone an idea what's going on here? ---------------------------------------------------------------------- marcov · 2014-02-26 10:44 Known samba bug:  https://bugzilla.samba.org/show_bug.cgi?id=8044, (fpc report http://bugs.freepascal.org/view.php?id=23732) There is also an issue with very long names, see http://bugs.freepascal.org/view.php?id=24885 this will only be fixed in the next major version of FPC. ---------------------------------------------------------------------- papayawhip · 2014-02-26 11:36 Hey, thanks for your quick response. I don't think it's a smb bug, because php can find all files. Code: [Select]