diff options
author | Saturneric <[email protected]> | 2021-11-29 04:43:00 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-11-29 04:47:06 +0000 |
commit | 839878e0a2c5dff8ed9d9422aaeebeee0e5ba964 (patch) | |
tree | 2b93ba3943053871ba39fd1b80966521bd77b4e8 /src/gpg/GpgConstants.cpp | |
parent | Fix Known Bugs. (diff) | |
download | GpgFrontend-839878e0a2c5dff8ed9d9422aaeebeee0e5ba964.tar.gz GpgFrontend-839878e0a2c5dff8ed9d9422aaeebeee0e5ba964.zip |
Solve uid management, related update and other known issues.
Diffstat (limited to 'src/gpg/GpgConstants.cpp')
-rw-r--r-- | src/gpg/GpgConstants.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpg/GpgConstants.cpp b/src/gpg/GpgConstants.cpp index 6f1b2250..497f7e0c 100644 --- a/src/gpg/GpgConstants.cpp +++ b/src/gpg/GpgConstants.cpp @@ -145,13 +145,13 @@ std::string GpgFrontend::get_file_extension(const std::string& path) { return {}; } -std::string GpgFrontend::get_file_name_with_path(const std::string& path) { +std::string GpgFrontend::get_only_file_name_with_path(const std::string& path) { // Create a Path object from given string std::filesystem::path path_obj(path); // Check if file name in the path object has extension if (path_obj.has_filename()) { // Fetch the extension from path object and return - return path_obj.parent_path() / path_obj.filename(); + return path_obj.parent_path() / path_obj.stem(); } // In case of no extension return empty string throw std::runtime_error("invalid file path"); |