Changeset 5599


Ignore:
Timestamp:
2003-10-07T17:12:44+13:00 (21 years ago)
Author:
jrm21
Message:

added important piece of feedback so that if the tmp dir isn't writeable, we
immediately say so instead of failing silently and causing later problems.

Location:
trunk/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/collectoraction.cpp

    r3546 r5599  
    324324
    325325    // assign (and create) a temporary directory
    326     assign_tmpname (args, logout);
     326    if (assign_tmpname (args, logout)==false) {
     327      // there was an error creating the tmp dir
     328      message="tmpfail";
     329      return true; // true because we could still parse the arguments
     330    }
    327331
    328332    // clean up any old builds left laying about in the tmp directory
     
    15421546// assigns a temporary directory name for this collector session
    15431547// and creates temporary directory
    1544 void collectoraction::assign_tmpname (cgiargsclass &args, ostream &logout) {
     1548// returns false if it couldn't create the directory
     1549bool collectoraction::assign_tmpname (cgiargsclass &args, ostream &logout) {
    15451550
    15461551  int i = 0;
     
    15561561    logout << text_t2ascii << "collectoraction::assign_tmpname unable to create directory ("
    15571562       << fulltmpdir << ")\n";
     1563    return false;
    15581564  }
    15591565
    15601566  args["bc1tmp"] = tmpname;
     1567  return true;
    15611568}
    15621569
  • trunk/gsdl/src/recpt/collectoraction.h

    r3546 r5599  
    7777  bool collection_protected (const text_t &collection);
    7878
    79   void assign_tmpname (cgiargsclass &args, ostream &logout);
     79  bool assign_tmpname (cgiargsclass &args, ostream &logout);
    8080
    8181  void gsdl_mkcol (cgiargsclass &args, ostream &logout);
Note: See TracChangeset for help on using the changeset viewer.