summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-02 14:22:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-02 14:22:50 +0000
commit9abdd5c94d13cddf74c074276a4ed0c310e2a32e (patch)
tree97a2b0097a9b37d2cb514c91a6af9bc69322cdd9
parentb4c938adf99d9ce1fcab46121e3a7c4ccb2a5acd (diff)
downloaddrakx-backup-do-not-use-9abdd5c94d13cddf74c074276a4ed0c310e2a32e.tar
drakx-backup-do-not-use-9abdd5c94d13cddf74c074276a4ed0c310e2a32e.tar.gz
drakx-backup-do-not-use-9abdd5c94d13cddf74c074276a4ed0c310e2a32e.tar.bz2
drakx-backup-do-not-use-9abdd5c94d13cddf74c074276a4ed0c310e2a32e.tar.xz
drakx-backup-do-not-use-9abdd5c94d13cddf74c074276a4ed0c310e2a32e.zip
(removeXiBSuffix): enhanced, more flexible
-rw-r--r--perl-install/common.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index ef141fe68..83ce5d198 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -600,9 +600,9 @@ sub setVirtual($) {
sub removeXiBSuffix($) {
local $_ = shift;
- /(\d+)k$/i and return $1 * 1024;
- /(\d+)M$/i and return $1 * 1024 * 1024;
- /(\d+)G$/i and return $1 * 1024 * 1024 * 1024;
+ /(\d+)\s*kB?$/i and return $1 * 1024;
+ /(\d+)\s*MB?$/i and return $1 * 1024 * 1024;
+ /(\d+)\s*GB?$/i and return $1 * 1024 * 1024 * 1024;
$_;
}
sub formatXiB {