From: pcanterino <> Date: Tue, 5 Oct 2004 17:43:11 +0000 (+0000) Subject: exec_unlock() now checks if the file is really in use. Otherwise, we return to X-Git-Tag: version_2_1~3 X-Git-Url: https://git.p6c8.net/devedit.git/commitdiff_plain/c8496a44e9c8ddc16f470ce2d52983e5531f77c7?ds=sidebyside;hp=ce4ed8bcf239ea532cc54bd872995a687de1c299 exec_unlock() now checks if the file is really in use. Otherwise, we return to directory view (maybe we change this behaviour and display an error message...). --- diff --git a/modules/Command.pm b/modules/Command.pm index 85b5fcf..591c8b1 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -6,7 +6,7 @@ package Command; # Execute Dev-Editor's commands # # Author: Patrick Canterino -# Last modified: 2004-10-04 +# Last modified: 2004-10-05 # use strict; @@ -825,10 +825,13 @@ sub exec_unlock($$) { my ($data,$config) = @_; my $virtual = $data->{'virtual'}; + my $uselist = $data->{'uselist'}; + + return devedit_reload({command => 'show', file => upper_path($virtual)}) if($uselist->unused($virtual)); if($data->{'cgi'}->param('confirmed')) { - file_unlock($data->{'uselist'},$virtual); + file_unlock($uselist,$virtual); return devedit_reload({command => 'show', file => upper_path($virtual)}); } else