mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
add io::directory_iterator
This commit is contained in:
parent
c3066eebd3
commit
347d76870a
13 changed files with 182 additions and 64 deletions
|
|
@ -42,14 +42,14 @@ void WorldConverter::addRegionsTasks(
|
|||
if (!io::is_directory(regionsFolder)) {
|
||||
return;
|
||||
}
|
||||
for (const auto& file : fs::directory_iterator(io::resolve(regionsFolder))) {
|
||||
for (const auto& file :io::directory_iterator(regionsFolder)) {
|
||||
int x, z;
|
||||
std::string name = file.path().stem().string();
|
||||
std::string name = file.stem();
|
||||
if (!WorldRegions::parseRegionFilename(name, x, z)) {
|
||||
logger.error() << "could not parse region name " << name;
|
||||
continue;
|
||||
}
|
||||
tasks.push(ConvertTask {taskType, file.path().u8string(), x, z, layerid});
|
||||
tasks.push(ConvertTask {taskType, file, x, z, layerid});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue