Ignore:
Timestamp:
2001-06-15T15:29:54+12:00 (23 years ago)
Author:
sjboddie
Message:

fixed a bug where the collector would have problems if a source directory
was entered with a trailing '\' (e.g. "c:\test\")

File:
1 edited

Legend:

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

    r2543 r2558  
    15571557  options += " -about \"" + carriage_replace (args["bc1aboutdesc"] + "_collectorextra_", 0) + "\"";
    15581558  options += " -collectdir \"" + tmpdir + "\" ";
     1559
     1560  // escape any backslashes in options with a second backslash
     1561  escape_slashes(options);
     1562
    15591563  text_t optionfile = filename_cat (tmpdir, "mkcol.opt");
    15601564  char *optionfilec = optionfile.getcstr();
     
    16811685    options += " -event_header " + ehead_file;
    16821686  }
     1687
     1688  // escape any backslashes in options with a second backslash
     1689  escape_slashes(options);
    16831690
    16841691  text_t optionfile = filename_cat (tmpdir, "build.opt");
     
    19281935  return url;
    19291936}
     1937
     1938void collectoraction::escape_slashes (text_t &oldval) {
     1939  text_t newval;
     1940  text_t::const_iterator here = oldval.begin();
     1941  text_t::const_iterator end = oldval.end();
     1942  while (here != end) {
     1943    if (*here == '\\') newval.push_back('\\');
     1944    newval.push_back(*here);
     1945    here ++;
     1946  }
     1947  oldval = newval;
     1948}
Note: See TracChangeset for help on using the changeset viewer.