aboutsummaryrefslogtreecommitdiff
path: root/paludis/merger.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/merger.cc')
-rw-r--r--paludis/merger.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/paludis/merger.cc b/paludis/merger.cc
index 6653273..8d14f81 100644
--- a/paludis/merger.cc
+++ b/paludis/merger.cc
@@ -744,7 +744,8 @@ Merger::install_file(const FSEntry & src, const FSEntry & dst_dir, const std::st
bool do_copy(false);
- if (0 == std::rename(stringify(src).c_str(), stringify(dst_real).c_str()))
+ if ((! _imp->params.options()[mo_nondestructive]) &&
+ 0 == std::rename(stringify(src).c_str(), stringify(dst_real).c_str()))
{
result += msi_rename;
@@ -957,7 +958,8 @@ Merger::install_dir(const FSEntry & src, const FSEntry & dst_dir)
if (is_selinux_enabled())
relabel_dir_recursive(src, dst);
- if (0 == std::rename(stringify(src).c_str(), stringify(dst).c_str()))
+ if ((! _imp->params.options()[mo_nondestructive]) &&
+ 0 == std::rename(stringify(src).c_str(), stringify(dst).c_str()))
{
result += msi_rename;
track_renamed_dir_recursive(dst);