Добавлена проверка на отсутствие файла и удаление из дерева

This commit is contained in:
svkalinin 2022-09-19 15:00:05 +03:00
parent 02bc6e852d
commit 8796277014
4 changed files with 10 additions and 2 deletions

0
errors
View File

View File

@ -258,6 +258,10 @@ namespace eval FileOper {
proc Edit {fileFullPath} {
global nbEditor tree
if {[file exists $fileFullPath] == 0} {
return false
}
set filePath [file dirname $fileFullPath]
set fileName [file tail $fileFullPath]
regsub -all {\.|/|\\|\s} $fileFullPath "_" itemName

View File

@ -107,7 +107,11 @@ namespace eval Tree {
# $tree item $id -open false
}
file {
FileOper::Edit $values
set v [FileOper::Edit $values]
if {$v eq false} {
$tree delete $id
}
unset v
}
I[0-9]*? {
destroy .findVariables

View File

@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
######################################################
# Version: 2.0.0
# Release: alpha
# Build: 18092022102313
# Build: 19092022115815
######################################################
# определим текущую версию, релиз и т.д.