summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-06-06 16:27:43 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-06-06 16:27:43 -0400
commit004150a5305d0df06c52a51a0df3ac26dd4a63cd (patch)
tree4da119abc46e1703ac87fcaf2559346fba4c66ce /indra
parente63c571d1336e3c521e1fc3a5e27bb77fc667790 (diff)
SL-18837: Concat path part with / rather than +=.
Using concatenation appends the intended filename to the parent directory name, instead of putting the filename in the parent directory.
Diffstat (limited to 'indra')
-rw-r--r--indra/test/namedtempfile.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h
index da4fec97c8..c215c50f3f 100644
--- a/indra/test/namedtempfile.h
+++ b/indra/test/namedtempfile.h
@@ -84,10 +84,12 @@ protected:
const std::string_view& sfx)
{
// Create file in a temporary place.
- boost::filesystem::path tempname{ boost::filesystem::temp_directory_path() };
- // unique_path() recommended template, but with underscores instead of
- // hyphens: some use cases involve temporary Python scripts
- tempname += stringize(pfx, "%%%%_%%%%_%%%%_%%%%", sfx);
+ boost::filesystem::path tempname{
+ boost::filesystem::temp_directory_path() /
+ // unique_path() recommended template, but with underscores
+ // instead of hyphens: some use cases involve temporary Python
+ // scripts
+ stringize(pfx, "%%%%_%%%%_%%%%_%%%%", sfx) };
mPath = boost::filesystem::unique_path(tempname);
boost::filesystem::ofstream out{ mPath };