summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNils Fuhrmann <nf@openoffice.org>2000-11-10 13:20:06 +0000
committerNils Fuhrmann <nf@openoffice.org>2000-11-10 13:20:06 +0000
commit34a5026ef7d0f0dd6d975704107773746f65dea0 (patch)
treeef66c2563c373a34632a801b96694fbb9e8d2b3e /tools
parent872e437a930ff86bf0b00e1ac4b2fe69210c1ab9 (diff)
Fix: Changed Search method. Works correctly now when the first entry of path is .
Diffstat (limited to 'tools')
-rw-r--r--tools/bootstrp/command.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/bootstrp/command.cxx b/tools/bootstrp/command.cxx
index c985c5448da5..696fdf12d704 100644
--- a/tools/bootstrp/command.cxx
+++ b/tools/bootstrp/command.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: command.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: nf $ $Date: 2000-09-28 13:53:44 $
+ * last change: $Author: nf $ $Date: 2000-11-10 14:20:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -554,6 +554,10 @@ ByteString CCommand::Search(ByteString aEnv, ByteString sItem)
return aComspec;
}
+ DirEntry aItem( String( sItem, RTL_TEXTENCODING_ASCII_US ));
+ if ( aItem.Exists())
+ return sItem;
+
ByteString aEntry, sReturn;
ByteString sEnv( aEnv );
ByteString sEnvironment = GetEnv( sEnv.GetBuffer());
@@ -573,6 +577,7 @@ ByteString CCommand::Search(ByteString aEnv, ByteString sItem)
String sEntry( aEntry, RTL_TEXTENCODING_ASCII_US );
DirEntry aDirEntry( sEntry );
+ aDirEntry.ToAbs();
if ( aDirEntry.Exists()) {
sReturn = aEntry;
bFound = TRUE;
@@ -595,12 +600,14 @@ ByteString CCommand::Search(ByteString aEnv, ByteString sItem)
String sEntry( aEntry, RTL_TEXTENCODING_ASCII_US );
DirEntry aDirEntry( sEntry );
+ aDirEntry.ToAbs();
if ( aDirEntry.Exists()) {
sReturn = aEntry;
bFound = TRUE;
}
}
}
+
if ( sReturn == "" )
sReturn = sItem;