]> git.p6c8.net - devedit.git/blobdiff - modules/File/Access.pm
- Check if unlocking of the list of files in use was successful
[devedit.git] / modules / File / Access.pm
index d892ed8082cde94c28b419addf77f2e12d57744f..4c4d0daafd56f3b32fb73c93e501383c560c7c6f 100644 (file)
@@ -7,7 +7,7 @@ package File::Access;
 # using only one command
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-02-09
+# Last modified: 2005-02-10
 #
 
 use strict;
@@ -192,16 +192,16 @@ sub file_save($$;$)
 # Params: 1. File::UseList object
 #         2. File to remove
 #
-# Return: -nothing-
+# Return: Status code (Boolean)
 
 sub file_unlock($$)
 {
  my ($uselist,$file) = @_;
 
- $uselist->remove_file($file);
- $uselist->save;
+ $uselist->remove_file($file) or return;
+ $uselist->save               or return;
 
- return;
+ return 1;
 }
 
 # it's true, baby ;-)

patrick-canterino.de