diff --git a/Cargo.lock b/Cargo.lock index f4e8157..ee517ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "rsmodules" -version = "0.5.4" +version = "0.5.6" dependencies = [ "bincode 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 32c23f4..9b23fcc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rsmodules" -version = "0.5.5" +version = "0.5.6" authors = ["Frederik Delaere "] [dependencies] diff --git a/setup_rsmodules.csh b/setup_rsmodules.csh index 2d27fa3..a6ea5d2 100644 --- a/setup_rsmodules.csh +++ b/setup_rsmodules.csh @@ -21,7 +21,9 @@ if ( -f ~/.rsmodules_autoload ) then endif # cleanup old tmp files from crashed rsmodules sessions -find ~/.rsmodulestmp* -mtime +1 -exec rm -f {} \; >& /dev/null +find ~/.rsmodulestmp* -mtime +1 -delete >& /dev/null +# also cleanup empty tmp files +find ~/.rsmodulestmp* -empty -delete >& /dev/null # this should be a function, so everytime it is called the info is updated set mod_av="`$RSMODULES_INSTALL_DIR/rsmodules noshell avail`" diff --git a/setup_rsmodules.sh b/setup_rsmodules.sh index 35a5557..61f4120 100644 --- a/setup_rsmodules.sh +++ b/setup_rsmodules.sh @@ -24,7 +24,9 @@ if [ -f ~/.rsmodules_autoload ]; then fi # cleanup old tmp files from crashed rsmodules sessions -find ~/.rsmodulestmp* -mtime +1 -exec rm -f {} \; 2> /dev/null +find ~/.rsmodulestmp* -mtime +1 -delete 2> /dev/null +# also cleanup empty tmp files +find ~/.rsmodulestmp* -empty -delete 2> /dev/null if [ ${BASH_VERSINFO:-0} -ge 3 ]; then # diff --git a/src/main.rs b/src/main.rs index 13c256b..19a7d26 100644 --- a/src/main.rs +++ b/src/main.rs @@ -457,7 +457,7 @@ fn run(args: &Vec) { // if it crashes we still need to delete the file - let cmd = format!("rm -f {}\n", tmp_file_path.display()); + let cmd = format!("\\rm -f {}\n", tmp_file_path.display()); let mut output_buffer = OUTPUT_BUFFER.lock().unwrap(); let ref mut output_buffer = *output_buffer;