Skip to content

Commit

Permalink
Bug fix: more clean way to create testnet data directory; prevents ab…
Browse files Browse the repository at this point in the history
…normal termination if parent does not exist (backport from 0.9).

Prevent exception in Freicoin-Qt when running first time on the testnet.
(freicoind is not affected because it requires the config file to start)
  • Loading branch information
r000n authored and Mark Friedenbach committed Dec 31, 2013
1 parent 6bd0798 commit 7f8f81a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,8 +1226,10 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
} else {
path = GetDefaultDataDir();
}
if (fNetSpecific && GetBoolArg("-testnet", false))
if (fNetSpecific && GetBoolArg("-testnet", false)) {
fs::create_directory(path);
path /= "testnet";
}

fs::create_directories(path);

Expand Down

0 comments on commit 7f8f81a

Please sign in to comment.