Skip to content

Commit

Permalink
fix default path
Browse files Browse the repository at this point in the history
  • Loading branch information
potree committed Nov 9, 2019
1 parent c39348e commit f77c87b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions PotreeConverter/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "PotreeException.h"

#include "arguments.hpp"
#include <experimental/filesystem>
#include <filesystem>

namespace fs = std::experimental::filesystem;

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

// set default parameters
fs::path pSource(a.source[0]);
a.outdir = args.has("outdir") ? args.get("outdir").as<string>() : pSource.generic_string() + "_converted";
if (args.has("outdir")) {
a.outdir = args.get("outdir").as<string>();
} else {
string name = fs::canonical(pSource).filename().string();
a.outdir = name + "_converted";
}

if (a.diagonalFraction != 0) {
a.spacing = 0;
Expand Down

0 comments on commit f77c87b

Please sign in to comment.