Don't crash if file doesn't exist
This commit is contained in:
parent
b24ade080f
commit
0ab8fb125d
|
@ -28,6 +28,8 @@ if {![exists -proc _del_bindir]} {
|
||||||
proc safe_delete {file {px ""}} {
|
proc safe_delete {file {px ""}} {
|
||||||
global _del_dustbin
|
global _del_dustbin
|
||||||
|
|
||||||
|
if {![file exists $file]} return 1
|
||||||
|
|
||||||
# Check if undelete is installed and that the file being
|
# Check if undelete is installed and that the file being
|
||||||
# deleted is not already in the dustbin.
|
# deleted is not already in the dustbin.
|
||||||
set dustbin 1
|
set dustbin 1
|
||||||
|
|
Loading…
Reference in New Issue