}
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, path, NULL, 1);
+ if (virtual_file_ex(&new_state, path, NULL, 1)) {
+ return NULL;
+ }
f = fopen(new_state.cwd, mode);
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, filename, NULL, 0);
+ if (virtual_file_ex(&new_state, filename, NULL, 0)) {
+ return -1;
+ }
ret = utime(new_state.cwd, buf);
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, filename, NULL, 1);
+ if (virtual_file_ex(&new_state, filename, NULL, 1)) {
+ return -1;
+ }
ret = chmod(new_state.cwd, mode);
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, filename, NULL, 0);
+ if (virtual_file_ex(&new_state, filename, NULL, 0)) {
+ return -1;
+ }
if (link) {
#if HAVE_LCHOWN
int f;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, path, NULL, 1);
+ if (virtual_file_ex(&new_state, path, NULL, 1)) {
+ return -1;
+ }
if (flags & O_CREAT) {
mode_t mode;
int f;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, path, NULL, 1);
+ if (virtual_file_ex(&new_state, path, NULL, 1)) {
+ return -1;
+ }
f = creat(new_state.cwd, mode);
int retval;
CWD_STATE_COPY(&old_state, &CWDG(cwd));
- virtual_file_ex(&old_state, oldname, NULL, 0);
+ if (virtual_file_ex(&old_state, oldname, NULL, 0)) {
+ return -1;
+ }
oldname = old_state.cwd;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, newname, NULL, 0);
+ if (virtual_file_ex(&new_state, newname, NULL, 0)) {
+ return -1;
+ }
newname = new_state.cwd;
retval = rename(oldname, newname);
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, path, NULL, 0);
+ if (virtual_file_ex(&new_state, path, NULL, 0)) {
+ return -1;
+ }
retval = lstat(new_state.cwd, buf);
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, path, NULL, 0);
+ if (virtual_file_ex(&new_state, path, NULL, 0)) {
+ return -1;
+ }
retval = unlink(new_state.cwd);
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, pathname, NULL, 1);
+ if (virtual_file_ex(&new_state, pathname, NULL, 1)) {
+ return -1;
+ }
#ifdef TSRM_WIN32
retval = mkdir(new_state.cwd);
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, pathname, NULL, 0);
+ if (virtual_file_ex(&new_state, pathname, NULL, 0)) {
+ return -1;
+ }
retval = rmdir(new_state.cwd);
DIR *retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
- virtual_file_ex(&new_state, pathname, NULL, 1);
+ if (virtual_file_ex(&new_state, pathname, NULL, 1)) {
+ return NULL;
+ }
retval = opendir(new_state.cwd);