search for: dir_ok

Displaying 1 result from an estimated 1 matches for "dir_ok".

Did you mean: did_ok
2008 Sep 01
0
Feature request: preallocation of directories
...gram_name, 0, "couldn't allocate newname"); return -1; } sprintf(newname, "%s/%s", dest_dir, name); size = st.st_size; if (mkdir(newname, st.st_mode) < 0) { if (errno == EEXIST) { if (stat(newname, &st) == 0 && S_ISDIR(st.st_mode)) goto dir_ok; errno = EEXIST; } if (!silent) com_err(program_name, errno, "while trying to mkdir %s", name); return -1; } dir_ok: if (st.st_size == blocksize) goto done; st.st_size = 0; num = 0; if (chdir(newname) < 0) { com_err(program_name, errno, "while trying to...