Package: xprt-xprintorg
Version: 0.0.9.final-2.backports.org.1
Severity: minor

[note:
 xprt-xprintorg / spooltodir.sh is from a Sarge system, not the one I'm 
 writing on
]

hello, 

while there's little chance to have the same filename in spooldir, 
nevertheless I'd rather add a little hack to avoid even such a 
possibility (eg. due to clock skew):

#----------------
--- spooltodir.sh       2005-01-30 03:23:26.000000000 +0100
+++ spooltodir.sh       2005-02-13 23:15:50.000000000 +0100
@@ -109,7 +109,12 @@
 filename="`echo \"${filename}\" | tr '[:blank:]' '_' | tr -c -d 
'[:alnum:]_.-'`"
 
 # ... add path and suffix ...
-filename="${spooldir}/${filename}${filename_suffix}"
+# ... should be unique, but check anyway
+if [ -e "${spooldir}/${filename}" ]; then
+  filename="`tempfile -d "${spooldir}" -s "_${filename}${filename_suffix}"`"
+else
+  filename="${spooldir}/${filename}${filename_suffix}"
+fi
 
 verbose "# File name is \"$filename\"."

#----------------

-- paolo

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux npp 2.4.26-ss-fb-lm287 #1 Fri Jul 16 21:26:09 CEST 2004 i686
Locale: LANG=it_IT, LC_CTYPE="[EMAIL PROTECTED]"

Versions of packages xprt-xprintorg depends on:
ii  libc6      2.2.5-14.3                    GNU C Library: Shared libraries an
ii  xlibs      4.2.1-15.backports.org.1      X Window System client libraries
ii  xprt-commo 0.0.9.final-2.backports.org.1 Xprint - the X11 print system (con



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to