Deprecated rak::path_expand.

This commit is contained in:
Jari Sundell
2026-01-08 15:27:53 +01:00
committed by GitHub
parent 289ab046bf
commit b233e24465
21 changed files with 72 additions and 325 deletions
+3 -4
View File
@@ -3,7 +3,6 @@
#include "core/download.h"
#include <list>
#include <rak/path.h>
#include <torrent/exceptions.h>
#include <torrent/rate.h>
#include <torrent/torrent.h>
@@ -19,8 +18,8 @@
namespace core {
Download::Download(download_type d) :
m_download(d) {
Download::Download(download_type d)
: m_download(d) {
m_download.info()->signal_tracker_success().push_back(std::bind(&Download::receive_tracker_msg, this, ""));
m_download.info()->signal_tracker_failed().push_back(std::bind(&Download::receive_tracker_msg, this, std::placeholders::_1));
@@ -142,7 +141,7 @@ Download::set_root_directory(const std::string& path) {
}
control->core()->download_list()->close_directly(this);
file_list->set_root_dir(rak::path_expand(path));
file_list->set_root_dir(expand_path(path));
bencode()->get_key("rtorrent").insert_key("directory", path);
}
+3 -4
View File
@@ -7,7 +7,6 @@
#include <functional>
#include <sstream>
#include <stdexcept>
#include <rak/path.h>
#include <torrent/utils/log.h>
#include <torrent/utils/resume.h>
#include <torrent/object.h>
@@ -123,7 +122,7 @@ DownloadFactory::receive_load() {
receive_loaded();
} else {
std::fstream stream(rak::path_expand(m_uri).c_str(), std::ios::in | std::ios::binary);
std::fstream stream(expand_path(m_uri).c_str(), std::ios::in | std::ios::binary);
if (!stream.is_open())
return receive_failed("Could not open file");
@@ -158,8 +157,8 @@ DownloadFactory::receive_commit() {
void
DownloadFactory::receive_success() {
auto rtorrent_object = download_factory_load_stream((rak::path_expand(m_uri) + ".rtorrent").c_str());
auto libtorrent_resume_object = download_factory_load_stream((rak::path_expand(m_uri) + ".libtorrent_resume").c_str());
auto rtorrent_object = download_factory_load_stream((expand_path(m_uri) + ".rtorrent").c_str());
auto libtorrent_resume_object = download_factory_load_stream((expand_path(m_uri) + ".libtorrent_resume").c_str());
uint32_t tracker_key;
+2 -2
View File
@@ -1,5 +1,7 @@
#include "config.h"
#include "core/manager.h"
#include <cstdio>
#include <cstring>
#include <fstream>
@@ -8,7 +10,6 @@
#include <sys/select.h>
#include <rak/address_info.h>
#include <rak/regex.h>
#include <rak/path.h>
#include <rak/string_manip.h>
#include <torrent/utils/resume.h>
#include <torrent/object.h>
@@ -33,7 +34,6 @@
#include "core/download.h"
#include "core/download_factory.h"
#include "core/http_queue.h"
#include "core/manager.h"
#include "core/view.h"
namespace core {