X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=blobdiff_plain;f=util.h;h=79b0d0eb778457d079d207a2537cf6acb5629b19;hp=f4c26ad4934f0b465020732c1397d227c99eb979;hb=aaedc06d0448b048c7d41074985f9ee81e93d077;hpb=1c580157d0fe6dc4dc0c10f97d9f9000a354b0d3 diff --git a/util.h b/util.h index f4c26ad..79b0d0e 100644 --- a/util.h +++ b/util.h @@ -50,5 +50,5 @@ _static_inline_ int osl_stat(const char *path, struct stat *buf) { if (stat(path, buf) >= 0) return 1; - return -E_OSL_STAT; + return errno == ENOENT? -E_OSL_NOENT : -E_OSL_STAT; }