Mercurial > hg
comparison mercurial/osutil.c @ 7022:bdc8d00c4ffa
osutil: proper error checking and reporting
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 10 Sep 2008 22:37:07 +0200 |
parents | 3b204881f959 |
children | 19e8d034932e |
comparison
equal
deleted
inserted
replaced
7021:75ce89ed3b6e | 7022:bdc8d00c4ffa |
---|---|
253 | 253 |
254 keep_stat = statobj && PyObject_IsTrue(statobj); | 254 keep_stat = statobj && PyObject_IsTrue(statobj); |
255 | 255 |
256 #ifdef AT_SYMLINK_NOFOLLOW | 256 #ifdef AT_SYMLINK_NOFOLLOW |
257 dfd = open(path, O_RDONLY); | 257 dfd = open(path, O_RDONLY); |
258 dir = fdopendir(dfd); | 258 if (dfd != -1) |
259 dir = fdopendir(dfd); | |
259 #else | 260 #else |
260 dir = opendir(path); | 261 dir = opendir(path); |
261 dfd = -1; | 262 dfd = -1; |
262 #endif | 263 #endif |
263 if (!dir) { | 264 if (!dir) { |