summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-08-09 10:00:07 +0000
committerOliver Bolte <obo@openoffice.org>2005-08-09 10:00:07 +0000
commit9e3244813e0173ee98418fa2593561f159a628a2 (patch)
treedaf0724f83a3a704113c4e9218535f5f91993339 /psprint
parent82ed6bc22931f5a303b7cb9c4256f97d38e1f56e (diff)
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)
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/helper/helper.cxx13
1 files changed, 10 insertions, 3 deletions
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 )