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.141 2004/05/13 18:11:06 grubba Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.142 2004/05/13 18:20:39 grubba 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:1597:    report_warning(LOCALE(47,"Creation of %O failed. Out of quota.\n"),    dest_path);    TRACE_LEAVE("PUT: Out of quota.");    return Roxen.http_status(507, "Out of disk quota.");    }    object source_file = open(source_path, "r");    if (!source_file) {    TRACE_LEAVE("Failed to open source file.");    return Roxen.http_status(404);    } +  // Workaround for Linux, Tru64 and FreeBSD not being POSIX. +  if (has_suffix(dest_path, "/")) { +  dest_path = dest_path[..sizeof(dest_path)-2]; +  }    object privs;    SETUID_TRACE("COPY: Copying file.", 0);    object dest_file = open(dest_path, "cwt");    privs = 0;    if (!dest_file) {    return errno_to_status (errno(), 1, id);    }    int len = source_st->size;    while (len > 0) {    string buf = source_file->read((len > 4096)?4096:len);