mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 06:02:31 +00:00
Added "-d" to change the default root dir.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@388 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -68,6 +68,8 @@ public:
|
||||
void set_port_range(int a, int b) { m_portFirst = a; m_portLast = b; }
|
||||
void set_listen_ip(const std::string& ip) { m_listenIp = ip; }
|
||||
|
||||
void set_default_root(const std::string& path);
|
||||
|
||||
void debug_tracker() { m_debugTracker = 0; }
|
||||
|
||||
private:
|
||||
@@ -95,9 +97,19 @@ private:
|
||||
int m_portLast;
|
||||
std::string m_listenIp;
|
||||
|
||||
std::string m_defaultRoot;
|
||||
|
||||
int m_debugTracker;
|
||||
};
|
||||
|
||||
inline void
|
||||
Manager::set_default_root(const std::string& path) {
|
||||
m_defaultRoot = path;
|
||||
|
||||
if (!m_defaultRoot.empty() && *m_defaultRoot.rbegin() != '/')
|
||||
m_defaultRoot.push_back('/');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user