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