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

version» Context lines:

Roxen.git/server/modules/filesystems/tarfs.pike:1:   // This is a roxen module. Copyright © 2000 - 2001, Roxen IS.      inherit "module";    - constant cvs_version= "$Id: tarfs.pike,v 1.9 2001/09/03 18:10:23 nilsson Exp $"; + constant cvs_version= "$Id: tarfs.pike,v 1.10 2001/09/25 19:49:39 nilsson Exp $";      // The Filesystem.Tar module is not threadsafe.   constant thread_safe=0;      //<locale-token project="mod_tarfs">_</locale-token>   #define _(X,Y) _DEF_LOCALE("mod_tarfs",X,Y)   // end of the locale related stuff   #include <module.h>      constant module_type = MODULE_LOCATION;
Roxen.git/server/modules/filesystems/tarfs.pike:26:    _(3,"Mount point"), TYPE_LOCATION|VAR_INITIAL,    _(4,"Where the module will be mounted in the site's virtual file "    "system.") );       defvar("tarfile", "docs.tar",    _(5,"Tar file and root path"), TYPE_FILE|VAR_INITIAL,    _(6,"The tarfile, and an optional root path (syntax: /tar/file.tar:/"    "root/dir/)") );   }    - string mp, error_msg; + string mp;      Filesystem.Tar tar;      string query_name()   {    return query("mountpoint")+" from "+query("tarfile");   }      void start()   {    string path = "", tf = query( "tarfile" );    mp = query("mountpoint");    sscanf( tf, "%s:%s", tf, path );    tar = 0;    if( catch(tar = Filesystem.Tar( tf )) )    { -  report_error( "Failed to open tar-file "+tf+"!" ); +  report_error( "Failed to open tar-file "+tf+"!\n" );    tar = 0;    }    else if( strlen( path ) )    tar->cd( path );   }         string query_location()   {    return mp;