File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -329,13 +329,13 @@ struct scoped_test_env
329
329
// If file.size() is too big, try to create a file directly inside
330
330
// /tmp to make sure file path is short enough.
331
331
if (file.size () <= sizeof (address.sun_path ) && utils::exists (" /tmp" )) {
332
- fs::path const tmp = " /tmp" ;
333
- std::size_t i = std::hash<std::string>()(std::to_string (std::time (nullptr )));
334
- fs::path p = tmp / (" libcxx-socket-" + file + " -" + std::to_string (i));
335
- while (utils::exists (p.string ())) {
336
- p = tmp / (" libcxx-socket-" + file + " -" + std::to_string (++i));
337
- }
338
- file = p.string ();
332
+ fs::path const tmp = " /tmp" ;
333
+ std::size_t i = std::hash<std::string>()(std::to_string (std::time (nullptr )));
334
+ fs::path p = tmp / (" libcxx-socket-" + file + " -" + std::to_string (i));
335
+ while (utils::exists (p.string ())) {
336
+ p = tmp / (" libcxx-socket-" + file + " -" + std::to_string (++i));
337
+ }
338
+ file = p.string ();
339
339
}
340
340
assert (file.size () <= sizeof (address.sun_path ));
341
341
::strncpy (address.sun_path, file.c_str(), sizeof(address.sun_path));
You can’t perform that action at this time.
0 commit comments