mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Fix a bug where "." or any single character file name doesn't get the
terminating / when setDirectory is called. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3d595cba33
commit
b0e1887014
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user