diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-10-22 00:23:11 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-10-22 00:23:11 +0100 |
| commit | 4cb3ed5008d54c6c61016ac0ff175550074e7245 (patch) | |
| tree | 1ac33eca6ad5aafe032e9f847d3ad37463fa31bf | |
| parent | b5a56fbc6c9d57ee6f3a4d0f67e92120b7115802 (diff) | |
| download | rabbitmq-server-git-4cb3ed5008d54c6c61016ac0ff175550074e7245.tar.gz | |
trivial and cosmetic
| -rw-r--r-- | src/file_handle_cache.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index 1d2914748f..c5efa00d1e 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -53,12 +53,12 @@ }). open(Path, Mode, Options, State) -> - Mode1 = lists:usort(Mode), Path1 = filename:absname(Path), case get({Path1, fhc_path}) of {gref, GRef} -> #file { reader_count = RCount, has_writer = HasWriter } = File = get({GRef, fhc_file}), + Mode1 = lists:usort(Mode), IsWriter = is_writer(Mode1), case IsWriter andalso HasWriter of true -> @@ -75,7 +75,6 @@ open(Path, Mode, Options, State) -> end; undefined -> GRef = make_ref(), - %% returns 0 even if file doesn't exist put({Path1, fhc_path}, {gref, GRef}), put({GRef, fhc_file}, #file { reader_count = 0, has_writer = false, path = Path1 }), |
