Skip to content

Commit f77c87b

Browse files
committed
fix default path
1 parent c39348e commit f77c87b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

PotreeConverter/src/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "PotreeException.h"
1212

1313
#include "arguments.hpp"
14-
#include <experimental/filesystem>
14+
#include <filesystem>
1515

1616
namespace fs = std::experimental::filesystem;
1717

@@ -237,7 +237,12 @@ PotreeArguments parseArguments(int argc, char **argv){
237237

238238
// set default parameters
239239
fs::path pSource(a.source[0]);
240-
a.outdir = args.has("outdir") ? args.get("outdir").as<string>() : pSource.generic_string() + "_converted";
240+
if (args.has("outdir")) {
241+
a.outdir = args.get("outdir").as<string>();
242+
} else {
243+
string name = fs::canonical(pSource).filename().string();
244+
a.outdir = name + "_converted";
245+
}
241246

242247
if (a.diagonalFraction != 0) {
243248
a.spacing = 0;

0 commit comments

Comments
 (0)