summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Win32/Path.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-13 07:51:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-13 07:51:52 +0000
commit790100674af63651437f0cbe41bd53c03d6877e0 (patch)
tree5ab40bff3fea630bdf2a5826fa35bd1a9ae0519f /llvm/lib/System/Win32/Path.cpp
parenta85abc23d5cace29dd3a107685dccf39fba3e534 (diff)
downloadbcm5719-llvm-790100674af63651437f0cbe41bd53c03d6877e0.tar.gz
bcm5719-llvm-790100674af63651437f0cbe41bd53c03d6877e0.zip
Fix a bug where "." or any single character file name doesn't get the
terminating / when setDirectory is called. llvm-svn: 18886
Diffstat (limited to 'llvm/lib/System/Win32/Path.cpp')
-rw-r--r--llvm/lib/System/Win32/Path.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/System/Win32/Path.cpp b/llvm/lib/System/Win32/Path.cpp
index 070ebb31208..8201dd4ab22 100644
--- a/llvm/lib/System/Win32/Path.cpp
+++ b/llvm/lib/System/Win32/Path.cpp
@@ -300,7 +300,7 @@ Path::setDirectory(const std::string& a_path) {
path = a_path;
FlipBackSlashes(path);
size_t last = a_path.size() -1;
- if (last != 0 && a_path[last] != '/')
+ if (a_path[last] != '/')
path += '/';
if (!isValid()) {
path = save.path;
OpenPOWER on IntegriCloud