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
This commit is contained in:
Stephan Aßmus
2011-03-19 13:49:28 +00:00
parent 7fae779766
commit e6c49e10f9
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -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;
+1 -1
View File
@@ -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;
};