Commit d34d5a37 authored by Kitware Robot's avatar Kitware Robot Committed by Brad King
Browse files

KWSys 2015-04-10 (69bccf2e)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 69bccf2e | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 9367a33b..69bccf2e
Brad King (1):
      69bccf2e SystemTools: Teach Touch with !create to succeed on missing file

Change-Id: I4af502542578b6a16ca4ddffb03553a046378e56
parent bc67dbed
......@@ -1260,15 +1260,22 @@ bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
bool SystemTools::Touch(const kwsys_stl::string& filename, bool create)
{
if(create && !SystemTools::FileExists(filename))
if (!SystemTools::FileExists(filename))
{
FILE* file = Fopen(filename, "a+b");
if(file)
if(create)
{
FILE* file = Fopen(filename, "a+b");
if(file)
{
fclose(file);
return true;
}
return false;
}
else
{
fclose(file);
return true;
}
return false;
}
#if defined(_WIN32) && !defined(__CYGWIN__)
HANDLE h = CreateFileW(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment