| 1 |
Description: use a random and unique temporary folder |
| 2 |
Author: Thomas Pierson <[email protected]> |
| 3 |
Acked-By: Mattia Rizzolo <[email protected]> |
| 4 |
Bug-Debian: https://bugs.debian.org/861987 |
| 5 |
Forwarded: not-needed |
| 6 |
Last-Update: 2017-05-15 |
| 7 |
|
| 8 |
--- a/src/FlightCrew/Misc/TempFolder.cpp |
| 9 |
+++ b/src/FlightCrew/Misc/TempFolder.cpp |
| 10 |
@@ -63,10 +63,10 @@ |
| 11 |
// that on Win because it points to the drive root there |
| 12 |
// instead of the system temp folder |
| 13 |
// http://www.delorie.com/gnu/docs/glibc/libc_295.html |
| 14 |
- fs::path main_temp_folder = fs::path( P_tmpdir ); |
| 15 |
+ fs::path main_temp_folder = fs::temp_directory_path(); |
| 16 |
#endif |
| 17 |
|
| 18 |
- return main_temp_folder / fs::path( FC_TEMP_FOLDER ) / fs::unique_path( UNIQUE_PATH_MODEL ); |
| 19 |
+ return main_temp_folder / fs::unique_path( UNIQUE_PATH_MODEL ); |
| 20 |
} |
| 21 |
|
| 22 |
|