diff options
author | Francois Pons <fpons@mandriva.com> | 2000-02-09 11:40:32 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-02-09 11:40:32 +0000 |
commit | 77d16a3330cab8b9c86667220114542958e7a348 (patch) | |
tree | e7fa44df3f8315f3e9cbad50b87bfc8250aeb6d4 /perl-install/resize_fat/dir_entry.pm | |
parent | 4ce69234e573c58002f3d1a9f361489410e883b2 (diff) | |
download | drakx-77d16a3330cab8b9c86667220114542958e7a348.tar drakx-77d16a3330cab8b9c86667220114542958e7a348.tar.gz drakx-77d16a3330cab8b9c86667220114542958e7a348.tar.bz2 drakx-77d16a3330cab8b9c86667220114542958e7a348.tar.xz drakx-77d16a3330cab8b9c86667220114542958e7a348.zip |
*** empty log message ***
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; |