Cabana: fix for internal source (#36998)

* fix for internal sources from cursor

* clean up

* more

* not needed

* clean up

* sure
This commit is contained in:
Shane Smiskol
2026-01-15 17:18:40 -08:00
committed by GitHub
parent 5e4b88201e
commit 7f8dbf24e7
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ std::string cacheFilePath(const std::string &url) {
}
std::string FileReader::read(const std::string &file, std::atomic<bool> *abort) {
const bool is_remote = file.find("https://") == 0;
const bool is_remote = (file.find("https://") == 0) || (file.find("http://") == 0);
const std::string local_file = is_remote ? cacheFilePath(file) : file;
std::string result;
+1 -1
View File
@@ -72,7 +72,7 @@ FrameReader::~FrameReader() {
}
bool FrameReader::load(CameraType type, const std::string &url, bool no_hw_decoder, std::atomic<bool> *abort, bool local_cache, int chunk_size, int retries) {
auto local_file_path = url.find("https://") == 0 ? cacheFilePath(url) : url;
auto local_file_path = (url.find("https://") == 0 || url.find("http://") == 0) ? cacheFilePath(url) : url;
if (!util::file_exists(local_file_path)) {
FileReader f(local_cache, chunk_size, retries);
if (f.read(url, abort).empty()) {
+2
View File
@@ -154,6 +154,8 @@ size_t getRemoteFileSize(const std::string &url, std::atomic<bool> *abort) {
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, dumy_write_cb);
curl_easy_setopt(curl, CURLOPT_HEADER, 1);
curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
CURLM *cm = curl_multi_init();
curl_multi_add_handle(cm, curl);