Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 3 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ option(BUILD_SHARED_LIBS "Build tgbot-cpp shared/static library." OFF)
option(BUILD_DOCUMENTATION "Build doxygen API documentation." OFF)

# sources
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
Royna2544 marked this conversation as resolved.
Show resolved Hide resolved
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(WIN32)
Expand Down Expand Up @@ -76,6 +76,7 @@ link_directories(${Boost_LIBRARY_DIR_RELEASE})
if(NOT Boost_USE_STATIC_LIBS)
add_definitions(-DBOOST_ALL_DYN_LINK)
endif()
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)

set(LIB_LIST
${CMAKE_THREAD_LIBS_INIT}
Expand Down
4 changes: 2 additions & 2 deletions 4 src/types/InputFile.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "tgbot/types/InputFile.h"
#include "tgbot/tools/StringTools.h"
#include "tgbot/tools/FileTools.h"

#include <filesystem>
#include <memory>
#include <string>

Expand All @@ -13,7 +13,7 @@ InputFile::Ptr InputFile::fromFile(const string& filePath, const string& mimeTyp
auto result(make_shared<InputFile>());
result->data = FileTools::read(filePath);
result->mimeType = mimeType;
result->fileName = StringTools::split(filePath, '/').back();
result->fileName = std::filesystem::path(filePath).filename().string();
return result;
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.