diff options
| author | Matthew Sackman <matthew@lshift.net> | 2010-04-18 15:04:56 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2010-04-18 15:04:56 +0100 |
| commit | 4e0e38054ce7c1351da8d23e50895b3dbbd37d14 (patch) | |
| tree | 2e91d490136ef215320b57b2e9889e9d2414418b | |
| parent | 90a5aacaf717c8d34e6dd710afe54d38681822d9 (diff) | |
| download | rabbitmq-server-git-4e0e38054ce7c1351da8d23e50895b3dbbd37d14.tar.gz | |
Make use of fhc:delete now that we have it
| -rw-r--r-- | src/rabbit_msg_store.erl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index 74b81f6156..e46d26645f 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -1630,16 +1630,14 @@ combine_files(#file_summary { file = Source, file_handle_cache:copy(TmpHdl, DestinationHdl, TmpSize), %% position in DestinationHdl should now be DestinationValid ok = file_handle_cache:sync(DestinationHdl), - ok = file_handle_cache:close(TmpHdl), - ok = file:delete(form_filename(Dir, Tmp)) + ok = file_handle_cache:delete(TmpHdl) end, {SourceWorkList, SourceValid} = find_unremoved_messages_in_file(Source, State), ok = copy_messages(SourceWorkList, DestinationValid, ExpectedSize, SourceHdl, DestinationHdl, Destination, State), %% tidy up - ok = file_handle_cache:close(SourceHdl), ok = file_handle_cache:close(DestinationHdl), - ok = file:delete(form_filename(Dir, SourceName)), + ok = file_handle_cache:delete(SourceHdl), ok. find_unremoved_messages_in_file(File, |
