mirror of
https://github.com/corda/corda.git
synced 2025-02-27 11:36:42 +00:00
fix interpretation of stat() return value in System::identify()
This commit is contained in:
parent
59d26362fa
commit
dc9ae3d269
@ -570,7 +570,7 @@ class MySystem: public System {
|
||||
virtual FileType identify(const char* name) {
|
||||
struct stat s;
|
||||
int r = stat(name, &s);
|
||||
if (r) {
|
||||
if (r == 0) {
|
||||
if (S_ISREG(s.st_mode)) {
|
||||
return File;
|
||||
} else if (S_ISDIR(s.st_mode)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user