Stamp out tabs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeff Cohen 2005-07-08 05:02:13 +00:00
parent 8f0e8f2047
commit 85c716f83d
2 changed files with 19 additions and 20 deletions

View File

@ -509,7 +509,7 @@ Path::eraseSuffix() {
if (dotpos != std::string::npos) {
if (slashpos == std::string::npos || dotpos > slashpos) {
path.erase(dotpos, path.size()-dotpos);
return true;
return true;
}
}
return false;

View File

@ -364,11 +364,10 @@ Path::getDirectoryContents(std::set<Path>& result) const {
WIN32_FIND_DATA fd;
std::string searchpath = path;
if (path.size() == 0 || searchpath[path.size()-1] == '/')
searchpath += "*";
searchpath += "*";
else
searchpath += "/*";
HANDLE h = FindFirstFile(searchpath.c_str(), &fd);
if (h == INVALID_HANDLE_VALUE) {
if (GetLastError() == ERROR_FILE_NOT_FOUND)
@ -453,7 +452,7 @@ Path::eraseSuffix() {
if (dotpos != std::string::npos) {
if (slashpos == std::string::npos || dotpos > slashpos) {
path.erase(dotpos, path.size()-dotpos);
return true;
return true;
}
}
return false;
@ -576,8 +575,8 @@ Path::eraseFromDisk(bool remove_contents) const {
if (strcmp(fd.cFileName, "..") == 0)
continue;
Path aPath(path);
aPath.appendComponent(&fd.cFileName[0]);
Path aPath(path);
aPath.appendComponent(&fd.cFileName[0]);
list.push_back(aPath);
} while (FindNextFile(h, &fd));