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

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1:   // This is a roxen module. Copyright © 1996 - 2001, Roxen IS.      // This is a virtual "file-system".   // It will be located somewhere in the name-space of the server.   // Also inherited by some of the other filesystems.      inherit "module";   inherit "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.143 2004/05/13 21:00:07 grubba Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.144 2004/05/14 16:54:22 anders Exp $";   constant thread_safe=1;      #include <module.h>   #include <roxen.h>   #include <stat.h>   #include <request_trace.h>         //<locale-token project="mod_filesystem">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("mod_filesystem",X,Y)
Roxen.git/server/modules/filesystems/filesystem.pike:1471:    return Roxen.http_status(405, "Not allowed.");    }    mapping|int(0..1) res = write_access(dest, 0, id) ||    write_access(combine_path(dest, "../"), 0, id);    if (mappingp(res)) return res;    string dest_path = path + dest;    catch { dest_path = decode_path(dest_path); };    dest_path = NORMALIZE_PATH (dest_path);    if (query("no_symlinks") && (contains_symlinks(path, dest_path))) {    errors++; -  report_error(LOCALE(46,"Copy to %O failed. Permission denied.\n"), +  report_error(LOCALE(57,"Copy to %O failed. Permission denied.\n"),    dest);    TRACE_LEAVE("COPY: Contains symlinks. Permission denied");    return Roxen.http_status(403, "Permission denied.");    }    Stat dest_st = stat_file(dest, id);    if (dest_st) {    SIMPLE_TRACE_ENTER (this, "COPY: Destination exists");    switch(overwrite) {    case NEVER_OVERWRITE:    TRACE_LEAVE("");
Roxen.git/server/modules/filesystems/filesystem.pike:1580:    return Roxen.http_status(dest_st?204:201, "Created");    } else {    return errno_to_status (err_code, 1, id);    }    } else {    string source_path = path + source;    catch { source_path = decode_path(source_path); };    source_path = NORMALIZE_PATH (source_path);    if (query("no_symlinks") && (contains_symlinks(path, source_path))) {    errors++; -  report_error(LOCALE(46,"Copy to %O failed. Permission denied.\n"), +  report_error(LOCALE(57,"Copy to %O failed. Permission denied.\n"),    dest);    TRACE_LEAVE("COPY: Contains symlinks. Permission denied");    return Roxen.http_status(403, "Permission denied.");    }    puts++;       QUOTA_WERR("Checking quota.\n");    if (id->misc->quota_obj && (id->misc->len > 0) &&    !id->misc->quota_obj->check_quota(mountpoint + dest,    source_st->size)) {