diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 07:51:52 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 07:51:52 +0000 |
commit | 790100674af63651437f0cbe41bd53c03d6877e0 (patch) | |
tree | 5ab40bff3fea630bdf2a5826fa35bd1a9ae0519f /llvm/lib/System/Win32/Path.cpp | |
parent | a85abc23d5cace29dd3a107685dccf39fba3e534 (diff) | |
download | bcm5719-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.cpp | 2 |
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; |