Changeset 2627
- Timestamp:
- 2001-07-06T13:04:33+12:00 (23 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/collectoraction.cpp
r2621 r2627 1559 1559 options += " -title \"" + args["bc1fullname"] + "\""; 1560 1560 options += " -about \"" + carriage_replace (args["bc1aboutdesc"] + "_collectorextra_", 0) + "\""; 1561 options += " -collectdir \"" + tmpdir + "\" "; 1562 1563 // escape any backslashes in options with a second backslash 1564 escape_slashes(options); 1561 options += " -collectdir \"" + remove_trailing_slashes(tmpdir) + "\" "; 1565 1562 1566 1563 text_t optionfile = filename_cat (tmpdir, "mkcol.opt"); … … 1671 1668 text_t type = "file://"; // default 1672 1669 if (i < numtypes) type = inputtypes[i]; 1673 options += " -download \"" + type + format_url(decode_commas(inputvalues[i])) + "\""; 1670 options += " -download \"" + 1671 remove_trailing_slashes(type + format_url(decode_commas(inputvalues[i]))) + "\""; 1674 1672 } 1675 1673 } … … 1688 1686 options += " -event_header " + ehead_file; 1689 1687 } 1690 1691 // escape any backslashes in options with a second backslash1692 escape_slashes(options);1693 1688 1694 1689 text_t optionfile = filename_cat (tmpdir, "build.opt"); … … 1939 1934 } 1940 1935 1941 void collectoraction::escape_slashes (text_t &oldval) { 1942 text_t newval; 1943 text_t::const_iterator here = oldval.begin(); 1944 text_t::const_iterator end = oldval.end(); 1945 while (here != end) { 1946 if (*here == '\\') newval.push_back('\\'); 1947 newval.push_back(*here); 1948 here ++; 1949 } 1950 oldval = newval; 1951 } 1936 text_t collectoraction::remove_trailing_slashes (text_t str) { 1937 1938 while (*(str.end()-1) == '\\') { 1939 str.pop_back(); 1940 } 1941 return str; 1942 } -
trunk/gsdl/src/recpt/collectoraction.h
r2558 r2627 101 101 text_t format_url (const text_t &url); 102 102 103 void escape_slashes (text_t &oldval);103 text_t remove_trailing_slashes (text_t str); 104 104 105 105 public:
Note:
See TracChangeset
for help on using the changeset viewer.