19 lines
629 B
Diff
19 lines
629 B
Diff
Index: netpbm-11.2.0/editor/ppmshadow
|
|
===================================================================
|
|
--- netpbm-11.2.0.orig/editor/ppmshadow
|
|
+++ netpbm-11.2.0/editor/ppmshadow
|
|
@@ -194,9 +194,10 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp";
|
|
my $ourtmp;
|
|
|
|
if ($keeptemp) {
|
|
- $ourtmp = "$tmpdir/ppmshadow$$";
|
|
- mkdir($ourtmp, 0777) or
|
|
- die("Unable to create directory for temporary files '$ourtmp");
|
|
+ chomp($ourtmp = `mktemp -d -t PPMshadow.XXXXXX`);
|
|
+ if ($? >> 8) {
|
|
+ die "Can't create directory for temporary files";
|
|
+ }
|
|
} else {
|
|
$ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", CLEANUP=>1);
|
|
}
|