Branch: Tag:

2004-05-12

2004-05-12 16:12:24 by Martin Stjernholm <mast@lysator.liu.se>

Fixed propagation of partial failures in recurse_delete_files.

Rev: server/base_server/module.pike:1.200

1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: module.pike,v 1.199 2004/05/12 15:19:48 mast Exp $ + // $Id: module.pike,v 1.200 2004/05/12 16:12:24 mast Exp $      #include <module_constants.h>   #include <module.h>
1208:    fname = path + fname;    if (Stat sub_stat = stat_file (fname, id)) {    SIMPLE_TRACE_ENTER (this, "Deleting %O recursively", fname); -  mapping(string:mixed) sub_res = recurse(fname, sub_stat); +  if (mapping(string:mixed) sub_res = recurse(fname, sub_stat)) {    // RFC 2518 8.6.2    // 424 (Failed Dependancy) errors SHOULD NOT be in the    // 207 (Multi-Status).
1216:    // Additionally 204 (No Content) errors SHOULD NOT be returned    // in the 207 (Multi-Status). The reason for this prohibition    // is that 204 (No Content) is the default success code. -  if (sub_res && sub_res->error != 204 && sub_res->error != 424) { +  if (sub_res->error != 204 && sub_res->error != 424) {    stat->add_status(fname, sub_res->error, sub_res->rettext); -  +  }    if (sub_res->error >= 300) fail = 1;    }    }