* Expand ~ in paths, all uses should be covered.

* Moved option file parsing to VariableMap and added "import" and
"try_import" options for loading option files.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@636 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-02-11 15:34:53 +00:00
parent e5c5f7ecb1
commit 4dea195340
13 changed files with 112 additions and 120 deletions
+3 -2
View File
@@ -40,6 +40,7 @@
#include <functional>
#include <stdexcept>
#include <dirent.h>
#include <rak/path.h>
#include "directory.h"
@@ -50,7 +51,7 @@ Directory::is_valid() const {
if (m_path.empty())
return false;
DIR* d = opendir(m_path.c_str());
DIR* d = opendir(rak::path_expand(m_path).c_str());
closedir(d);
return d;
@@ -61,7 +62,7 @@ Directory::update(bool hideDot) {
if (m_path.empty())
throw std::logic_error("Directory::update() tried to open an empty path");
DIR* d = opendir(m_path.c_str());
DIR* d = opendir(rak::path_expand(m_path).c_str());
if (d == NULL)
return false;