summaryrefslogtreecommitdiff
path: root/_obnammodule.c
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-07-11 11:35:32 +1200
committerLars Wirzenius <liw@liw.fi>2010-07-11 11:35:32 +1200
commit02d6447ac78ec3bc0ea9da8f87ca263592c667a9 (patch)
treec1e15b9f97f82e4338d38f68c9ac170f0b99719b /_obnammodule.c
parent5d4da199344780051b7e0070c6e11f0501a922e8 (diff)
downloadobnam-02d6447ac78ec3bc0ea9da8f87ca263592c667a9.tar.gz
Have lutimes wrapper return errno if there was an error.
Diffstat (limited to '_obnammodule.c')
-rw-r--r--_obnammodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/_obnammodule.c b/_obnammodule.c
index 829bb817..e45acf8d 100644
--- a/_obnammodule.c
+++ b/_obnammodule.c
@@ -35,6 +35,7 @@
#define _XOPEN_SOURCE 600
+#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -72,6 +73,8 @@ lutimes_wrapper(PyObject *self, PyObject *args)
tv[1].tv_sec = mtime;
tv[1].tv_usec = 0;
ret = lutimes(filename, tv);
+ if (ret == -1)
+ ret = errno;
return Py_BuildValue("i", ret);
}