Avoided redundant logging of -cd commands
This commit is contained in:
parent
463c42d3e3
commit
c915d8d68d
@ -191,6 +191,9 @@ set cmd_log_target ""
|
||||
# Whether to log essential commands: 0=off , 1=no extract , 2=with extract
|
||||
set cmd_logging_mode 0
|
||||
|
||||
# The last logged -cd path. Used to prevent redundant logging of -cd.
|
||||
set recent_cd_path ""
|
||||
|
||||
|
||||
# xorriso specific constants
|
||||
|
||||
@ -5524,9 +5527,16 @@ proc localfs_ls {dir} {
|
||||
# Log a command (if enabled)
|
||||
#
|
||||
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 {[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 == ""} {
|
||||
effectuate_command_logging 0
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2013.01.04.140336"
|
||||
#define Xorriso_timestamP "2013.01.04.143459"
|
||||
|
Loading…
Reference in New Issue
Block a user