diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-12-02 22:39:19 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-12-02 22:39:19 +0000 |
commit | a729aad21bd3748856954d9cd655cd96eee442d5 (patch) | |
tree | 413361d50a7b9bf1929eb29a42c8444d9f6ad4de /_obnammodule.c | |
parent | 6dd6fef8c9dc437d9e273fc390b8e65c018a957f (diff) | |
download | obnam-a729aad21bd3748856954d9cd655cd96eee442d5.tar.gz |
fix handling of no extended attributes in C wrapper
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 c2d8b5e4..d07f0f8c 100644 --- a/_obnammodule.c +++ b/_obnammodule.c @@ -142,7 +142,7 @@ llistxattr_wrapper(PyObject *self, PyObject *args) char *buf = malloc(bufsize); ssize_t n = llistxattr(filename, 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); |