summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-02-07 21:15:27 +0000
committerChris Wilson <chris+github@qwirx.com>2014-02-07 21:15:27 +0000
commitbe018ca83afdc71a44c3a33b45d1bba5e611ec69 (patch)
treee50b90fa3f1a5afcbf512811a09ac931c0c2eff3
parent0c2a96b68aeed02146e898cdba590d8b47f4f46f (diff)
Don't need to protect InvisibleTempFileStream against exceptions.
By definition, it will be cleared up by the OS automatically. Also we don't need to support gcc 2.x any more. It was replaced by gcc3 in 2001, 12 years ago.
-rw-r--r--lib/backupstore/BackupCommands.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/backupstore/BackupCommands.cpp b/lib/backupstore/BackupCommands.cpp
index 8f113a41..fb1d1e45 100644
--- a/lib/backupstore/BackupCommands.cpp
+++ b/lib/backupstore/BackupCommands.cpp
@@ -395,26 +395,10 @@ std::auto_ptr<BackupProtocolMessage> BackupProtocolGetFile::DoCommand(BackupProt
p + 16);
// Open the temporary file
- std::auto_ptr<IOStream> combined;
- try
- {
- {
- // Write nastily to allow this to work with gcc 2.x
- std::auto_ptr<IOStream> t(
- new InvisibleTempFileStream(
- tempFn.c_str(),
- O_RDWR | O_CREAT |
- O_EXCL | O_BINARY |
- O_TRUNC));
- combined = t;
- }
- }
- catch(...)
- {
- // Make sure it goes
- ::unlink(tempFn.c_str());
- throw;
- }
+ std::auto_ptr<IOStream> combined(
+ new InvisibleTempFileStream(
+ tempFn, O_RDWR | O_CREAT | O_EXCL |
+ O_BINARY | O_TRUNC));
// Do the combining
BackupStoreFile::CombineFile(*diff, *diff2, *from, *combined);