From c8496a44e9c8ddc16f470ce2d52983e5531f77c7 Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Tue, 5 Oct 2004 17:43:11 +0000 Subject: [PATCH 1/1] 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...). --- modules/Command.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.34.1