mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-14 17:33:25 +00:00
[paker] Fix creating parent dir.
This commit is contained in:
parent
789bcf5063
commit
3699b94db0
1 changed files with 3 additions and 1 deletions
|
|
@ -111,7 +111,9 @@ int main(int argc, char *argv[]) {
|
||||||
p.n_files = files.size();
|
p.n_files = files.size();
|
||||||
p.n_blocks = nsegs;
|
p.n_blocks = nsegs;
|
||||||
|
|
||||||
fs::create_directories(name.parent_path());
|
if (!name.parent_path().empty()) {
|
||||||
|
fs::create_directories(name.parent_path());
|
||||||
|
}
|
||||||
std::ofstream{name};
|
std::ofstream{name};
|
||||||
fs::resize_file(name, total);
|
fs::resize_file(name, total);
|
||||||
primitives::templates2::mmap_file<uint8_t> f{name, primitives::templates2::mmap_file<uint8_t>::rw{}};
|
primitives::templates2::mmap_file<uint8_t> f{name, primitives::templates2::mmap_file<uint8_t>::rw{}};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue