diff --git a/src/core/download_factory.cc b/src/core/download_factory.cc index 9f2b4407..b338e713 100644 --- a/src/core/download_factory.cc +++ b/src/core/download_factory.cc @@ -109,7 +109,7 @@ DownloadFactory::receive_load() { m_variables.set("tied_to_file", (int64_t)false); } else { - m_stream = new std::fstream(rak::path_expand(m_uri).c_str(), std::ios::in); + m_stream = new std::fstream(rak::path_expand(m_uri).c_str(), std::ios::in | std::ios::binary); if (m_stream->good()) receive_loaded(); diff --git a/src/input/path_input.cc b/src/input/path_input.cc index 018c22bf..863e0649 100644 --- a/src/input/path_input.cc +++ b/src/input/path_input.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include "path_input.h" @@ -70,7 +71,7 @@ struct _transform_filename { void operator () (std::string& filename) { rak::file_stat fs; - if (!fs.update((m_base + filename))) + if (!fs.update(rak::path_expand(m_base + filename))) return; else if (fs.is_directory()) diff --git a/src/utils/lockfile.cc b/src/utils/lockfile.cc index 69516ca6..17a22f86 100644 --- a/src/utils/lockfile.cc +++ b/src/utils/lockfile.cc @@ -124,7 +124,7 @@ Lockfile::locked_by() const { return process_type(std::string(), 0); char first[256]; - char* last = first + std::max(read(fd, first, 255), 0); + char* last = first + std::max(read(fd, first, 255), 0); *last = '\0'; ::close(fd);