Merge branch 'upstream-kwsys' into update-kwsys
This commit is contained in:
commit
e538858349
|
@ -1260,7 +1260,9 @@ bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
|
||||||
|
|
||||||
bool SystemTools::Touch(const kwsys_stl::string& filename, bool create)
|
bool SystemTools::Touch(const kwsys_stl::string& filename, bool create)
|
||||||
{
|
{
|
||||||
if(create && !SystemTools::FileExists(filename))
|
if (!SystemTools::FileExists(filename))
|
||||||
|
{
|
||||||
|
if(create)
|
||||||
{
|
{
|
||||||
FILE* file = Fopen(filename, "a+b");
|
FILE* file = Fopen(filename, "a+b");
|
||||||
if(file)
|
if(file)
|
||||||
|
@ -1270,6 +1272,11 @@ bool SystemTools::Touch(const kwsys_stl::string& filename, bool create)
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
HANDLE h = CreateFileW(
|
HANDLE h = CreateFileW(
|
||||||
SystemTools::ConvertToWindowsExtendedPath(filename).c_str(),
|
SystemTools::ConvertToWindowsExtendedPath(filename).c_str(),
|
||||||
|
|
Loading…
Reference in New Issue