- Fixed enabling/disabling targets. Spotted by Witold Kowolik.
authormgandalf <mgandalf@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 18 Dec 2008 16:05:55 +0000 (16:05 +0000)
committermgandalf <mgandalf@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 18 Dec 2008 16:05:55 +0000 (16:05 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@619 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scstadmin/scstadmin

index ee943ae..1d85523 100755 (executable)
@@ -1415,6 +1415,8 @@ sub enableTarget {
        my $target = shift;
        my $enable = shift;
 
+       $target = unformatTarget($target);
+
        return undef if (!defined($$TARGETS{$target}));
 
        my $io = new IO::File $$TARGETS{$target}->{'path'}, O_WRONLY;
@@ -1435,7 +1437,7 @@ sub enableTarget {
 
        close $io;
 
-       $$TARGETS{unformatTarget($target)}->{'enabled'} = $enable;
+       $$TARGETS{$target}->{'enabled'} = $enable;
 
        return $FALSE;
 }