Results 1 to 4 of 4

Thread: Another way to fail spectacularly in Linux

  1. #1

    Another way to fail spectacularly in Linux

    Code:
    FindFirst(path + '*.*', faDirectory, SearchRec)
    Windows is patient and kind to fools and maybe allows this travesty for historical reasons.
    Linux is not.

    In Windows, *.* means any file. In Linux, any file that has a period in its name.
    Your code won't see any of the folders it tries to list.
    Use '*', Luke.

  2. #2
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Learned that quite a while ago. Which is why I have a few {$IFDEF UNIX} in my code now
    Existence is pain

  3. #3
    Good point.

    Maybe that's the reason my engine's file finder doesn't work as expected on Windows but does in Linux. Should revisit it.
    No signature provided yet.

  4. #4
    Quote Originally Posted by Chebmaster View Post
    In Windows, *.* means any file. In Linux, any file that has a period in its name.
    More accurate would be that on Windows *.* means file with any name and any file extension.
    But unlike Windows Linux does not use file extensions. When on Linux you see file which appears to have an extension like "file.txt" that is not a file with an "txt" extension but only a file whose name contains ".txt" at the end.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •