Download raw body.
Loss of original errors
Stefan Sperling: > err = got_path_mkdir(abspath); > - if (err && err->code == GOT_ERR_ERRNO && errno == EEXIST) { > - struct stat sb; > - err = NULL; > - if (lstat(abspath, &sb) == -1) { > - err = got_error_from_errno2("lstat", abspath); > - } else if (!S_ISDIR(sb.st_mode)) { > - /* TODO directory is obstructed; do something */ > - err = got_error_path(abspath, GOT_ERR_FILE_OBSTRUCTED); > - } > + if (err) > + goto done; > + > + if (lstat(abspath, &sb) == -1) { > + err = got_error_from_errno2("lstat", abspath); > + } else if (!S_ISDIR(sb.st_mode)) { > + /* TODO directory is obstructed; do something */ > + err = got_error_path(abspath, GOT_ERR_FILE_OBSTRUCTED); > } That doesn't look right. If we successfully create a new directory, we'll return an error that the path was obstructed. -- Christian "naddy" Weisgerber naddy@mips.inka.de
Loss of original errors