From 15d51a0d90acfa8f4a7799a6775d9e2ca74afb4a Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 2 Jan 2023 22:36:49 +0200 Subject: [PATCH 1/1] Remove the now obsolete install_filename from FileTarget --- source/lib/filetarget.h | 2 -- source/lib/installedfile.cpp | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/source/lib/filetarget.h b/source/lib/filetarget.h index da165d0..d2ed719 100644 --- a/source/lib/filetarget.h +++ b/source/lib/filetarget.h @@ -15,7 +15,6 @@ protected: Msp::Time::TimeStamp mtime; unsigned size = 0; Msp::FS::Path install_location; - std::string install_filename; bool nested_build_sig = false; bool arch_in_build_sig = false; @@ -33,7 +32,6 @@ public: bool is_installable() const { return !install_location.empty(); } const Msp::FS::Path &get_install_location() const { return install_location; } - const std::string &get_install_filename() const { return install_filename; } /// Changes the mtime of the target to the current time. void touch(); diff --git a/source/lib/installedfile.cpp b/source/lib/installedfile.cpp index 6e45ad2..ef7a770 100644 --- a/source/lib/installedfile.cpp +++ b/source/lib/installedfile.cpp @@ -42,11 +42,7 @@ FS::Path InstalledFile::generate_target_path(const FS::Path &global_prefix, cons if(mid.empty()) mid = tgt.get_install_location(); - string fn = tgt.get_install_filename(); - if(fn.empty()) - fn = FS::basename(tgt.get_path()); - - return prefix/mid/fn; + return prefix/mid/FS::basename(tgt.get_path()); } void InstalledFile::set_symlink(const FS::Path &l) -- 2.43.0