Make sudo make install work how it should.

This commit is contained in:
2025-03-27 17:16:10 -04:00
parent f89cbb96cc
commit f36652ad67
2 changed files with 5 additions and 3 deletions

View File

@@ -18,5 +18,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the build type" FORCE)
endif()
install(TARGETS ReArchive DESTINATION /usr/lib)
install(TARGETS rsarchive DESTINATION /usr/bin)
include(GNUInstallDirs)
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
install(TARGETS ReArchive DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS rsarchive DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

@@ -216,7 +216,7 @@ bool ReArchive::OverwriteFile(const std::filesystem::path& archive, const std::f
file_table = current_file_table;
const FileEntry* target = nullptr;
auto file_entries = file_table.GetEntries();
auto file_entries = file_table->GetEntries();
auto value = file_entries->find(file_path);
if (value != file_entries->end())