From 77d16a3330cab8b9c86667220114542958e7a348 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 9 Feb 2000 11:40:32 +0000 Subject: *** empty log message *** --- perl-install/resize_fat/dir_entry.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'perl-install/resize_fat/dir_entry.pm') diff --git a/perl-install/resize_fat/dir_entry.pm b/perl-install/resize_fat/dir_entry.pm index be3bd436a..390659b0e 100644 --- a/perl-install/resize_fat/dir_entry.pm +++ b/perl-install/resize_fat/dir_entry.pm @@ -5,6 +5,10 @@ use strict; my $DELETED_FLAG = 0xe5; + +my $READ_ONLY_ATTR = 0x01; +my $HIDDEN_ATTR = 0x02; +my $SYSTEM_ATTR = 0x04; my $VOLUME_LABEL_ATTR = 0x08; my $VFAT_ATTR = 0x0f; my $DIRECTORY_ATTR = 0x10; @@ -21,6 +25,11 @@ sub set_cluster($$) { $entry->{first_cluster_high} = $val >> 16 if $resize_fat::isFAT32; } +sub is_unmoveable($) { + my ($entry) = @_; + $entry->{attributes} & $HIDDEN_ATTR || $entry->{attributes} & $SYSTEM_ATTR; +} + sub is_directory($) { my ($entry) = @_; $entry->{attributes} & $DIRECTORY_ATTR && $entry->{name} !~ /^\.\.? / && !is_special_entry($entry); @@ -50,8 +59,9 @@ sub is_special_entry($) { #- return true if entry has been modified +#- curr_dir_name is added to contains current directory name, "" for root. sub remap { - my ($entry) = @_; + my ($curr_dir_name, $entry) = @_; is_special_entry($entry) and return; -- cgit v1.2.1