mirror of
https://github.com/rwengine/openrw.git
synced 2025-04-28 21:08:05 +03:00
unique_path doesn't exist in std::filesystem
This commit is contained in:
parent
bf345af47a
commit
26983ffa3d
1 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
#include <rw/debug.hpp>
|
#include <rw/debug.hpp>
|
||||||
#include <rw/filesystem.hpp>
|
#include <rw/filesystem.hpp>
|
||||||
|
@ -92,7 +93,8 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static rwfs::path getRandomFilePath(const rwfs::path &dirname) {
|
static rwfs::path getRandomFilePath(const rwfs::path &dirname) {
|
||||||
return rwfs::unique_path(dirname / "openrw_test_%%%%%%%%%%%%%%%%");
|
const long current_time = std::chrono::high_resolution_clock::now().time_since_epoch().count();
|
||||||
|
return dirname / ("openrw_test_" + std::to_string(current_time));
|
||||||
}
|
}
|
||||||
static rwfs::path getRandomFilePath() {
|
static rwfs::path getRandomFilePath() {
|
||||||
return getRandomFilePath(rwfs::temp_directory_path());
|
return getRandomFilePath(rwfs::temp_directory_path());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue