Roxen.git / server / modules / configuration / update.pike

version» Context lines:

Roxen.git/server/modules/configuration/update.pike:1:   /* -  * $Id: update.pike,v 1.43 2011/01/21 19:02:20 mast Exp $ +  * $Id$    *    * The Roxen Update Client    * Copyright © 2000 - 2009, Roxen IS.    *    * Author: Johan Schön    * January-March 2000, June 2001    */      #ifdef UPDATE_DEBUG   # define UPDATE_MSG(X) werror("Update client: "+X+"\n")
Roxen.git/server/modules/configuration/update.pike:483:    }       r_rm(prefix+to+"~");    return "Wrote "+replace(prefix+to,"//","/")+".";   }      array(string) low_unpack_tarfile(Filesystem.Tar fs, string dir, mapping errors)   {    array(string) res=({ });    foreach(sort(fs->get_dir(dir)), string entry) -  if(fs->stat(entry)->isdir()) +  if(fs->stat(entry)->isdir)    res += low_unpack_tarfile(fs, entry, errors);    else    {    string tmp;    mixed err;    err=catch(tmp=unpack_file(fs->open(entry,"r"), entry));    if(tmp)    res+=({ tmp });    if(err)    {
Roxen.git/server/modules/configuration/update.pike:676:    a+=({ (int)r });    return sort(a);   }      mapping get_headers()   {    mapping m = ([ "host":"update.roxen.com:80",    "user-agent": roxen->real_version ]);       if(sizeof(query("userpassword"))) -  m->authorization="Basic "+MIME.encode_base64(query("userpassword")); +  m->authorization="Basic "+MIME.encode_base64(query("userpassword"), 1);    return m;   }         int completely_downloaded(int num)   {    Stat stat=r_file_stat(roxen_path(query("pkgdir"))+"/"+num+".tar");    return (stat && (stat[1]==pkginfo[(string)num]->size));   }