summaryrefslogtreecommitdiff
path: root/_obnammodule.c
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-10-21 19:55:31 +0100
committerLars Wirzenius <liw@liw.fi>2012-10-21 19:55:31 +0100
commit904a89f74977e6299c907bb1a45d8b837eb0e3ae (patch)
treed6f15beb7801302482385a72002d37f701794c61 /_obnammodule.c
parent4a9f801b7e86e6236bcfa4376a8ff320ee787e2e (diff)
downloadobnam-904a89f74977e6299c907bb1a45d8b837eb0e3ae.tar.gz
Fix Obnam to read empty xattr values correctly
Diffstat (limited to '_obnammodule.c')
-rw-r--r--_obnammodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/_obnammodule.c b/_obnammodule.c
index 7b8217b2..55d8eef0 100644
--- a/_obnammodule.c
+++ b/_obnammodule.c
@@ -177,7 +177,7 @@ lgetxattr_wrapper(PyObject *self, PyObject *args)
char *buf = malloc(bufsize);
ssize_t n = lgetxattr(filename, attrname, buf, bufsize);
- if (n > 0)
+ if (n >= 0)
o = Py_BuildValue("s#", buf, (int) n);
else if (n == -1 && errno != ERANGE)
o = Py_BuildValue("i", errno);