Avoided redundant logging of -cd commands

This commit is contained in:
Thomas Schmitt 2013-01-04 14:36:05 +00:00
parent 3fb9d23882
commit 343b12b190
2 changed files with 12 additions and 2 deletions

View File

@ -191,6 +191,9 @@ set cmd_log_target ""
# Whether to log essential commands: 0=off , 1=no extract , 2=with extract # Whether to log essential commands: 0=off , 1=no extract , 2=with extract
set cmd_logging_mode 0 set cmd_logging_mode 0
# The last logged -cd path. Used to prevent redundant logging of -cd.
set recent_cd_path ""
# xorriso specific constants # xorriso specific constants
@ -5524,9 +5527,16 @@ proc localfs_ls {dir} {
# Log a command (if enabled) # Log a command (if enabled)
# #
proc log_command {cmd} { proc log_command {cmd} {
global cmd_log_conn cmd_logging_mode global cmd_log_conn cmd_logging_mode recent_cd_path
if {$cmd_logging_mode < 1} {return ""} if {$cmd_logging_mode < 1} {return ""}
if {[string first "-cd " $cmd] == 0} {
set path [string range $cmd 4 end]
if {$path == $recent_cd_path} {return ""}
set recent_cd_path $path
}
if {$cmd_log_conn == ""} { if {$cmd_log_conn == ""} {
effectuate_command_logging 0 effectuate_command_logging 0
} }

View File

@ -1 +1 @@
#define Xorriso_timestamP "2013.01.04.140336" #define Xorriso_timestamP "2013.01.04.143459"