X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/d5e736038704bf5dad49f06541658930d6fc3deb..e7d91227055ce4f15477dc60c4d54a844928878d:/modules/File/Access.pm?ds=sidebyside diff --git a/modules/File/Access.pm b/modules/File/Access.pm index da783d3..2727775 100644 --- a/modules/File/Access.pm +++ b/modules/File/Access.pm @@ -7,7 +7,7 @@ package File::Access; # with only one command # # Author: Patrick Canterino -# Last modified: 09-26-2003 +# Last modified: 2003-11-04 # use strict; @@ -15,7 +15,6 @@ use strict; use vars qw(@EXPORT); use Carp qw(croak); -use File::Spec; ### Export ### @@ -59,7 +58,7 @@ sub dir_read($) { next if($entry eq "." || $entry eq ".."); - if(-d File::Spec->canonpath($dir."/".$entry)) + if(-d $dir."/".$entry) { push(@dirs,$entry); } @@ -126,15 +125,12 @@ sub file_read($) sub file_save($$) { my ($file,$content) = @_; - my $temp = $file.".temp"; local *FILE; - open(FILE,">",$temp) or return; + open(FILE,">",$file) or return; print FILE $$content or do { close(FILE); return }; close(FILE) or return; - rename($temp,$file) or return; - return 1; }