freebsd-ports/sysutils/magicrescue/files/patch-magicsort
2013-10-26 07:52:07 +00:00

20 lines
575 B
Text

--- ./magicsort.orig 2013-10-26 09:06:33.969663571 +0200
+++ ./magicsort 2013-10-26 09:06:33.972663781 +0200
@@ -13,7 +13,7 @@
while (defined(my $file = readdir DH)) {
next unless -f $file;
- open FILE, "-|", "file", $file or die "Executing file: $!\n";
+ open(FILE, 'file '.$file.'|') or die "Executing file: $!\n";
my $idstring = <FILE>;
close FILE;
@@ -25,7 +25,7 @@
next;
}
my $dir = substr($idstring, length($file) + 2);
- mkdir $dir;
+ mkdir $dir,0755;
rename $file, "$dir/$file" or warn "Cannot move $file: $!\n";
}