Roxen.git / server / modules / filesystems / filesystem.pike

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1059:    if (query("no_symlinks") && (contains_symlinks(path, f))) {    privs = 0;    errors++;    report_error(LOCALE(46,"Creation of %O failed. Permission denied.\n"),    oldf);    TRACE_LEAVE(sprintf("%s: Contains symlinks. Permission denied",    id->method));    return Roxen.http_status(403, "Permission denied.");    }    +  TRACE_ENTER(sprintf("%s: Accepted", id->method), 0); +     code = mkdir(f);    int err_code = errno();    -  TRACE_ENTER(sprintf("%s: Accepted", id->method), 0); -  +     if (code) {    string msg = safe_chmod(f, 0777 & ~(id->misc->umask || 022));    privs = 0;    if (msg) {    TRACE_LEAVE(sprintf("%s: chmod %O failed: %s", id->method, f, msg));    } else {    TRACE_LEAVE(sprintf("%s: Success", id->method));    }    TRACE_LEAVE("Success");    if (id->method == "MKCOL") {    return Roxen.http_status(201, "Created");    }    return Roxen.http_string_answer("Ok");    } else {    privs = 0; -  SIMPLE_TRACE_LEAVE("%s: Failed (errcode:%d)", id->method, errcode); +  SIMPLE_TRACE_LEAVE("%s: Failed (err: %d: %s)", +  id->method, err_code, strerror(err_code));    TRACE_LEAVE("Failure");    if (id->method == "MKCOL") {    if (err_code ==   #if constant(System.ENOENT)    System.ENOENT   #elif constant(System.ENOENT)    System.ENOENT   #else    2   #endif