#1546 stat() fails on //servername/sharename


When the stat() function is run on a path like //servername/sharename, it fails with error "No such file or directory".
It should succeed and detect that the path is a directory (when it exists).

I have experienced this problem with all versions of Mingw, at least since Sep 2005.

Erwin Waterlander


  • Erwin Waterlander

    Example C code.

  • Earnie Boyd

    Earnie Boyd - 2011-05-19

    And what happens if you use \\server\share instead of //server/share? This is the Windows C library you're accessing and there isn't anything we can do to fix it.

  • Earnie Boyd

    Earnie Boyd - 2011-05-19
    • status: open --> pending
  • Erwin Waterlander

    • status: pending --> open
  • Erwin Waterlander

    Backslashes or forward slashes make no difference.

    I just compiled the example with Watcom C 1.9, and that also fails. Only Watcom gives a different error: "I/O error".

    chdir(), and opendir() all succeed on //servername/sharename. Using chdir() is my workaround to test if the path is a directory.


  • Earnie Boyd

    Earnie Boyd - 2011-05-20
    • labels: --> mingw runtime (deprecated use WSL)
    • milestone: --> Known_Feature
    • status: open --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks