Insta360Develop / CameraSDK-Cpp

CameraSDK-Cpp is a C++ library to control Insta360 cameras.
https://www.insta360.com
115 stars 16 forks source link

cam.DownloadCameraFile crashing my program #37

Open Sofbernabei opened 11 months ago

Sofbernabei commented 11 months ago

Using Insta360 ONERS:

Hi, looking for guidance for this issue.

my file_to_download and file_to_save files are defined as such:

std::string file_to_download = cam.GetHttpBaseUrl() + origin_url.substr(1); std::string file_to_save = "C:\Users\sbernabei_user\Desktop\DesktopFolder\" + std::filesystem::path(origin_url).filename().u8string();

when I call cam.DownloadCameraFile(file_to_download, file_to_save), my program quits out without showing me the "download fail" error. The camera file names are being saved to the desktopfolder but they have no content (0KB).

Please help.

Sofbernabei commented 11 months ago

and yes my \ are escaped in my actual code, not sure why it didnt copy over like this: std::string file_to_save = "C:\ \Users\ \sbernabei_user\ \ Desktop\ \DesktopFolder\ \ \" + std::filesystem::path(origin_url).filename().u8string();