git://git.onelab.eu
/
util-vserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Read resource values from a resources dictionary
[util-vserver.git]
/
python
/
vduimpl.c
diff --git
a/python/vduimpl.c
b/python/vduimpl.c
index
01fc63c
..
fb219ff
100644
(file)
--- a/
python/vduimpl.c
+++ b/
python/vduimpl.c
@@
-537,6
+537,7
@@
do_vdu(PyObject *self, PyObject *args)
int res;
struct stats s;
HashTable tbl;
int res;
struct stats s;
HashTable tbl;
+ int cwd_fd;
if (!PyArg_ParseTuple(args, "s", &path))
return Py_None;
if (!PyArg_ParseTuple(args, "s", &path))
return Py_None;
@@
-545,7
+546,9
@@
do_vdu(PyObject *self, PyObject *args)
s.inodes = s.blocks = s.size = 0;
(void) Init(&tbl,0,0);
s.inodes = s.blocks = s.size = 0;
(void) Init(&tbl,0,0);
+ cwd_fd = open(".", O_RDONLY);
res = vdu_onedir(&tbl, &s, path);
res = vdu_onedir(&tbl, &s, path);
+ fchdir(cwd_fd);
/* deallocate whatever has been added to tbl */
Dispose(&tbl);
/* deallocate whatever has been added to tbl */
Dispose(&tbl);