Browse Source

ENH: handle read only directories with configure file destination

pull/1/head
Bill Hoffman 21 years ago
parent
commit
bb316a4945
  1. 9
      Source/kwsys/SystemTools.cxx

9
Source/kwsys/SystemTools.cxx

@ -995,10 +995,11 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination)
return false;
}
if ( SystemTools::FileExists(destination) && !SystemTools::RemoveFile(destination) )
{
return false;
}
// try and remove the destination file so that read only destination files
// can be written to.
// If the remove fails continue so that files in read only directories
// that do not allow file removal can be modified.
SystemTools::RemoveFile(destination);
#if defined(_WIN32) || defined(__CYGWIN__)
kwsys_ios::ofstream fout(destination,

Loading…
Cancel
Save