diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-02-07 21:15:27 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-02-07 21:15:27 +0000 |
commit | be018ca83afdc71a44c3a33b45d1bba5e611ec69 (patch) | |
tree | e50b90fa3f1a5afcbf512811a09ac931c0c2eff3 | |
parent | 0c2a96b68aeed02146e898cdba590d8b47f4f46f (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.cpp | 24 |
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); |