diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-10-21 19:55:31 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-10-21 19:55:31 +0100 |
commit | 904a89f74977e6299c907bb1a45d8b837eb0e3ae (patch) | |
tree | d6f15beb7801302482385a72002d37f701794c61 /_obnammodule.c | |
parent | 4a9f801b7e86e6236bcfa4376a8ff320ee787e2e (diff) | |
download | obnam-904a89f74977e6299c907bb1a45d8b837eb0e3ae.tar.gz |
Fix Obnam to read empty xattr values correctly
Diffstat (limited to '_obnammodule.c')
-rw-r--r-- | _obnammodule.c | 2 |
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); |