Skip to content

stat() on empty path returns 0 instead of -1 #485

Open

Description

@timschumi
#include <sys/stat.h>

int main() {
    // <snip>

    struct stat st;
    if (stat("", &st) == 0)
        // <do something>

    // <snip>
}

Personally, I tested this by using one of the examples from 3ds-examples, putting the code above right at the beginning and shutting down/exiting the application if the return code is zero.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions