mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-02-16 02:30:44 +00:00
Fix download path generation
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
#ifdef __linux__
|
||||
@@ -29,7 +30,7 @@ extern bool Terminate;
|
||||
extern uint64_t UDPSock;
|
||||
extern uint64_t TCPSock;
|
||||
extern std::string Branch;
|
||||
extern std::string CachingDirectory;
|
||||
extern std::filesystem::path CachingDirectory;
|
||||
extern bool deleteDuplicateMods;
|
||||
extern bool TCPTerminate;
|
||||
extern std::string LastIP;
|
||||
|
||||
@@ -200,11 +200,11 @@ inline std::wstring ToWString(const std::string& s) {
|
||||
throw std::runtime_error("EVP_DigestInit_ex2() failed");
|
||||
}
|
||||
|
||||
std::wifstream stream(filename, std::ios::binary);
|
||||
std::ifstream stream(filename, std::ios::binary);
|
||||
|
||||
const size_t FileSize = std::filesystem::file_size(filename);
|
||||
size_t Read = 0;
|
||||
std::vector<wchar_t> Data;
|
||||
std::vector<char> Data;
|
||||
while (Read < FileSize) {
|
||||
Data.resize(size_t(std::min<size_t>(FileSize - Read, 4096)));
|
||||
size_t RealDataSize = Data.size();
|
||||
|
||||
Reference in New Issue
Block a user