Skip to content

Commit

Permalink
Fix CI Windows
Browse files Browse the repository at this point in the history
caused by fs::path implicit conversion to std::string.
  • Loading branch information
baderouaich committed Jan 5, 2024
1 parent f45105e commit ad528ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/manual_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class MyBot : public Bot {
getApi()->sendMessage(message->chat->id, "Sending URL photo...");
getApi()->sendPhoto(message->chat->id, "https://www.hdwallpapers.in/download/landscape_view_of_sunset_under_yellow_black_cloudy_sky_4k_5k_hd_nature-5120x2880.jpg");
getApi()->sendMessage(message->chat->id, "Sending File photo...");
getApi()->sendPhoto(message->chat->id, cpr::File{fs::path(__FILE__).parent_path().parent_path() / "examples/sendPhoto/photos/image1.jpg"});
getApi()->sendPhoto(message->chat->id, cpr::File{(fs::path(__FILE__).parent_path().parent_path() / "examples/sendPhoto/photos/image1.jpg").string()});
} else if (message->text == "/inline_buttons") {
/*
Create inline keyboard buttons
Expand Down Expand Up @@ -247,7 +247,7 @@ class MyBot : public Bot {
for (const fs::path& localPhotoPath: {fs::path(__FILE__).parent_path().parent_path() / "examples/sendPhoto/photos/image1.jpg",
fs::path(__FILE__).parent_path().parent_path() / "examples/sendPhoto/photos/image2.jpg"}) {
Ptr<InputMediaPhoto> photo(new InputMediaPhoto());
photo->media = cpr::File{localPhotoPath}; // Local
photo->media = cpr::File{localPhotoPath.string()}; // Local
photo->hasSpoiler = false;
mediaGroup.push_back(photo);
}
Expand Down

0 comments on commit ad528ac

Please sign in to comment.