fstool based applications (showattr, setattr, chxid) changed into this
directory without going back. So the other objects can not be found
anymore (resp. the wrong ones) [reported and patched by Daniel Hokka
Zakrisson; http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14313]
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2202
94cd875c-1c1d-0410-91d2-
eb244daf1a30
}
if (S_ISDIR(st.st_mode) && !global_args->do_display_dir) {
+ int cur_dir = Eopen(".", O_RDONLY, 0);
+ uint64_t ret;
Echdir(path);
- return iterateFilesystem(path);
+ ret = iterateFilesystem(path);
+ Efchdir(cur_dir);
+ Eclose(cur_dir);
+ return ret;
}
else
return handleFile(path, path) ? 0 : 1;