]> git.p6c8.net - devedit.git/blobdiff - modules/File/Access.pm
- For security reasons, I completely changed the handling of symbolic links:
[devedit.git] / modules / File / Access.pm
index 4c4d0daafd56f3b32fb73c93e501383c560c7c6f..dd6403bffaaab0fe18e6b5baa02c946023faf34a 100644 (file)
@@ -7,7 +7,7 @@ package File::Access;
 # using only one command
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-02-10
+# Last modified: 2005-02-12
 #
 
 use strict;
@@ -46,7 +46,7 @@ $has_flock = eval { local $SIG{'__DIE__'}; flock(STDOUT,0); 1 };
 # Params: Directory
 #
 # Return: Hash reference: dirs  => directories
-#                         files => files
+#                         files => files and symbolic links
 
 sub dir_read($)
 {
@@ -72,7 +72,7 @@ sub dir_read($)
  {
   next if($entry eq '.' || $entry eq '..');
 
-  if(-d $dir.'/'.$entry)
+  if(-d $dir.'/'.$entry && not -l $dir.'/'.$entry)
   {
    push(@dirs,$entry);
   }

patrick-canterino.de