KWSys 2013-02-05 (5c34ed2e)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 5c34ed2e | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 5b0d1bd9..5c34ed2e Brad King (1): 5c34ed2e SystemTools: Do not abort with no current directory Change-Id: Id054017eac2bf10c71ca721df48298cdff2bea82
This commit is contained in:
parent
23ae484120
commit
9d66f74335
|
@ -196,18 +196,16 @@ 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] == ':')
|
||||
{
|
||||
buf[0] = toupper(buf[0]);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
// make sure the drive letter is capital
|
||||
if(strlen(buf) > 1 && buf[1] == ':')
|
||||
{
|
||||
buf[0] = toupper(buf[0]);
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
inline int Chdir(const char* dir)
|
||||
{
|
||||
|
@ -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