Roxen.git / server / modules / tags / writefile.pike

version» Context lines:

Roxen.git/server/modules/tags/writefile.pike:4:   //   // This module is open source software; you can redistribute it and/or   // modify it under the terms of the GNU General Public License as published   // by the Free Software Foundation; either version 2, or (at your option) any   // later version.   //      #define _ok id->misc->defines[" _ok"]      constant cvs_version = -  "$Id: writefile.pike,v 1.10 2001/10/30 22:24:53 srb%cuci.nl Exp $"; +  "$Id: writefile.pike,v 1.11 2001/11/26 14:00:14 mast Exp $";   constant thread_safe = 1;      #include <module.h>   #include <config.h>      inherit "module";         // ---------------- Module registration stuff ----------------   
Roxen.git/server/modules/tags/writefile.pike:79:    class Frame {    inherit RXML.Frame;       array do_return(RequestID id) {    CACHE(0);    _ok = 1;    if(!sizeof(args->filename)) {    _ok = 0;    return 0;    } +     string filename,rootpath,path,schroot=args->chroot||""; -  path=dirname(id->conf->real_file(id->not_query||"/", id))+"/"; -  rootpath=QUERY(onlysubdirs)?path:id->conf->real_file("/",id); +  +  path = id->conf->real_file(id->not_query||"/", id); +  if (!path) +  parse_error ("There is no file system for %O that supports this tag " +  "(i.e. implements real_file).\n", id->not_query || "/"); +  +  path=dirname(path)+"/"; +  if (QUERY(onlysubdirs)) +  rootpath = path; +  else { +  rootpath = id->conf->real_file("/",id); +  if (!rootpath) +  parse_error ("There is no file system for / that supports this tag " +  "(i.e. implements real_file).\n"); +  } +     filename=((schroot+args->filename)[0]=='/'?rootpath:path)+    Stdio.append_path(schroot, args->filename);    if(args->remove) {    if(!rm(filename))    _ok = 0;    } else if(IS(args->moveto)) {    if(!mv(filename,((schroot+args->moveto)[0]=='/'?rootpath:path)+    Stdio.append_path(schroot, args->moveto)))    _ok = 0;    } else {