Merge topic 'update-kwsys'
7df291f
Merge branch 'upstream-kwsys' into update-kwsys9d66f74
KWSys 2013-02-05 (5c34ed2e)
This commit is contained in:
commit
e8df4cab82
|
@ -196,12 +196,8 @@ inline int Rmdir(const char* dir)
|
|||
}
|
||||
inline const char* Getcwd(char* buf, unsigned int len)
|
||||
{
|
||||
const char* ret = _getcwd(buf, len);
|
||||
if(!ret)
|
||||
if(const char* ret = _getcwd(buf, len))
|
||||
{
|
||||
fprintf(stderr, "No current working directory.\n");
|
||||
abort();
|
||||
}
|
||||
// make sure the drive letter is capital
|
||||
if(strlen(buf) > 1 && buf[1] == ':')
|
||||
{
|
||||
|
@ -209,6 +205,8 @@ inline const char* Getcwd(char* buf, unsigned int len)
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
inline int Chdir(const char* dir)
|
||||
{
|
||||
#if defined(__BORLANDC__)
|
||||
|
@ -245,13 +243,7 @@ inline int Rmdir(const char* dir)
|
|||
}
|
||||
inline const char* Getcwd(char* buf, unsigned int len)
|
||||
{
|
||||
const char* ret = getcwd(buf, len);
|
||||
if(!ret)
|
||||
{
|
||||
fprintf(stderr, "No current working directory\n");
|
||||
abort();
|
||||
}
|
||||
return ret;
|
||||
return getcwd(buf, len);
|
||||
}
|
||||
|
||||
inline int Chdir(const char* dir)
|
||||
|
@ -3089,7 +3081,7 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_path,
|
|||
}
|
||||
else
|
||||
{
|
||||
// ??
|
||||
base_components.push_back("");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue