Skip to content

Commit

Permalink
make relative temporary paths absolute during the system startup. This
Browse files Browse the repository at this point in the history
…fixes #1896
  • Loading branch information
dothebart committed Sep 27, 2016
1 parent 4b8148e commit daa5c9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ApplicationFeatures/TempFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "Basics/ArangoGlobalContext.h"
#include "Basics/files.h"
#include "Basics/FileUtils.h"
#include "Logger/Logger.h"
#include "ProgramOptions/ProgramOptions.h"
#include "ProgramOptions/Section.h"
Expand All @@ -49,6 +50,12 @@ void TempFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {
new StringParameter(&_path));
}

void TempFeature::validateOptions(std::shared_ptr<ProgramOptions> options) {
if (_path.length() > 0 ) {
basics::FileUtils::makePathAbsolute(_path);
}
}

void TempFeature::prepare() {
TRI_SetApplicationName(_appname.c_str());
}
Expand Down
1 change: 1 addition & 0 deletions lib/ApplicationFeatures/TempFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class TempFeature final : public application_features::ApplicationFeature {

public:
void collectOptions(std::shared_ptr<options::ProgramOptions>) override final;
void validateOptions(std::shared_ptr<options::ProgramOptions>) override final;
void prepare() override final;
void start() override final;

Expand Down

0 comments on commit daa5c9f

Please sign in to comment.