Browse Source

- fixed warning under Windows, because stat uner windows returns "" for blksize

master
Andreas Romeyke 1 month ago
parent
commit
ce177b5df0
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      lib/Archive/BagIt/Role/Algorithm.pm

+ 2
- 1
lib/Archive/BagIt/Role/Algorithm.pm View File

@@ -15,7 +15,8 @@ sub get_optimal_bufsize {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat $fh;
if ((defined $blksize ) && ($blksize >= 512)) {
# Windows systems return "" for $blksize
if ((defined $blksize ) && ($blksize ne "") && ($blksize >= 512)) {
return $blksize;
}
return 8192;


Loading…
Cancel
Save