From 7cdf5a2bb678e6f798029a17156a3bcd64178202 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 26 Oct 2015 09:29:29 +0000 Subject: [PATCH] printers4lazarus: cups: checkif tmp dir writable git-svn-id: trunk@50172 - --- components/printers/unix/cupsprinters.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/printers/unix/cupsprinters.inc b/components/printers/unix/cupsprinters.inc index e8f0078db8..cf9757b3a2 100644 --- a/components/printers/unix/cupsprinters.inc +++ b/components/printers/unix/cupsprinters.inc @@ -851,9 +851,12 @@ var var CurPath: String; begin + Result:=false; CurPath:=CleanAndExpandDirectory(Path); - Result:=DirPathExists(CurPath); - if Result then NewPath:=CurPath; + if CurPath='' then exit(false); + if not DirectoryIsWritable(CurPath) then exit; + NewPath:=CurPath; + Result:=true; end; begin