diff options
Diffstat (limited to 'packaging/SGI/sambalp')
-rw-r--r-- | packaging/SGI/sambalp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packaging/SGI/sambalp b/packaging/SGI/sambalp index fd0cef8f933..61e62215c91 100644 --- a/packaging/SGI/sambalp +++ b/packaging/SGI/sambalp @@ -146,5 +146,12 @@ if ($PSFIX) { # are we running a "psfix"? system("$lpcommand $file"); } -# Remove the file only if it lives in /usr/tmp, /tmp, or /var/tmp. -unlink($file) if $file =~ m=^(/(usr|var))?/tmp=; +if ($file =~ m(^/)) { + # $file is a fully specified path + # Remove the file only if it lives in a directory ending in /tmp. + unlink($file) if ($file =~ m(/tmp/[^/]+$)); +} else { + # $file is NOT a fully specified path + # Remove the file only if current directory ends in /tmp. + unlink($file) if (`pwd` =~ m(/tmp$)); +} |