diff options
Diffstat (limited to 'perl-install/resize_fat/dir_entry.pm')
-rw-r--r-- | perl-install/resize_fat/dir_entry.pm | 12 |
1 files changed, 11 insertions, 1 deletions
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; |