From e6c49e10f99c49c67971071d288c992ad3948d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 19 Mar 2011 13:49:28 +0000 Subject: [PATCH] Don't ignore the entire var directory, but rather only the swap file specifically. There is already a TODO in the code for replacing this mechanism with something cleaner and more flexible. Resolves ticket #7367. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41026 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/installer/CopyEngine.cpp | 10 +++++----- src/apps/installer/CopyEngine.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/installer/CopyEngine.cpp b/src/apps/installer/CopyEngine.cpp index dedc19666c..d75509bc8f 100644 --- a/src/apps/installer/CopyEngine.cpp +++ b/src/apps/installer/CopyEngine.cpp @@ -107,10 +107,10 @@ CopyEngine::ResetTargets(const char* source) // makes sense, since passing a volume is meant to folders that are // volume specific, like "trash". BPath path(source); - if (path.Append("common/var") == B_OK) - fVarDirectory.SetTo(path.Path()); + if (path.Append("common/var/swap") == B_OK) + fSwapFileEntry.SetTo(path.Path()); else - fVarDirectory.Unset(); + fSwapFileEntry.Unset(); } @@ -535,9 +535,9 @@ CopyEngine::_ShouldCopyEntry(const BEntry& entry, const char* name, return false; } } - if (fVarDirectory == entry) { + if (fSwapFileEntry == entry) { // current location of var - printf("ignoring common/'%s'.\n", name); + printf("ignoring swap file\n"); return false; } return true; diff --git a/src/apps/installer/CopyEngine.h b/src/apps/installer/CopyEngine.h index 19ae251969..61558e7128 100644 --- a/src/apps/installer/CopyEngine.h +++ b/src/apps/installer/CopyEngine.h @@ -110,7 +110,7 @@ private: // TODO: Should be made into a list of BEntris to be ignored, perhaps. // settable by method... - BEntry fVarDirectory; + BEntry fSwapFileEntry; };