From 9e3244813e0173ee98418fa2593561f159a628a2 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 9 Aug 2005 10:00:07 +0000 Subject: INTEGRATION: CWS gslpatches3 (1.21.14); FILE MERGED 2005/06/27 12:22:28 pl 1.21.14.1: #i51254# do not stat files unnecessarily often (thanks to mmeeks) --- psprint/source/helper/helper.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'psprint') diff --git a/psprint/source/helper/helper.cxx b/psprint/source/helper/helper.cxx index 61ac0c4dcb31..b321f2eb327b 100644 --- a/psprint/source/helper/helper.cxx +++ b/psprint/source/helper/helper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: helper.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: obo $ $Date: 2005-04-13 08:14:49 $ + * last change: $Author: obo $ $Date: 2005-08-09 11:00:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -403,6 +403,7 @@ bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile ) void psp::normPath( OString& rPath ) { char buf[PATH_MAX]; + ByteString aPath( rPath ); // double slashes and slash at end are probably @@ -413,10 +414,16 @@ void psp::normPath( OString& rPath ) if( aPath.Len() > 0 && aPath.GetChar( aPath.Len()-1 ) == '/' ) aPath.Erase( aPath.Len()-1 ); - if( realpath( aPath.GetBuffer(), buf ) ) + if( ( aPath.Search( "./" ) != STRING_NOTFOUND || + aPath.Search( "~" ) != STRING_NOTFOUND ) + && realpath( aPath.GetBuffer(), buf ) ) + { rPath = buf; + } else + { rPath = aPath; + } } void psp::splitPath( OString& rPath, OString& rDir, OString& rBase ) -- cgit