mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 06:32:31 +00:00
Added special syntax to config files to enable log categories early.
This commit is contained in:
+2
-2
@@ -16,12 +16,12 @@ expand_path(const std::string& path) {
|
||||
|
||||
if (path[0] == '~') {
|
||||
if (path.size() >= 2 && path[1] != '/')
|
||||
throw torrent::input_error("Could not expand ~ in session path, only '~' or '~/...' is supported.");
|
||||
throw torrent::input_error("Could not expand ~ in path, only '~' or '~/...' is supported.");
|
||||
|
||||
const char* home = std::getenv("HOME");
|
||||
|
||||
if (home == nullptr || *home == '\0')
|
||||
throw torrent::input_error("Could not expand ~ in session path, HOME environment variable not set.");
|
||||
throw torrent::input_error("Could not expand ~ in path, HOME environment variable not set.");
|
||||
|
||||
return home + path.substr(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user