ENH: do not link . and .. during install
This commit is contained in:
parent
3cb2ba9e90
commit
763791fc27
|
@ -40,18 +40,22 @@ void QMacInstallDialog::DoInstall()
|
||||||
{
|
{
|
||||||
QFileInfo fileInfo = list.at(i);
|
QFileInfo fileInfo = list.at(i);
|
||||||
std::string filename = fileInfo.fileName().toStdString();
|
std::string filename = fileInfo.fileName().toStdString();
|
||||||
|
if(filename.size() && filename[0] == '.')
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
std::string file = fileInfo.absoluteFilePath().toStdString();
|
std::string file = fileInfo.absoluteFilePath().toStdString();
|
||||||
std::string newName = installTo;
|
std::string newName = installTo;
|
||||||
newName += "/";
|
newName += "/";
|
||||||
newName += filename;
|
newName += filename;
|
||||||
std::cout << "ln -s [" << file << "] [";
|
|
||||||
std::cout << newName << "]\n";
|
|
||||||
// Remove the old files
|
// Remove the old files
|
||||||
if(cmSystemTools::FileExists(newName.c_str()))
|
if(cmSystemTools::FileExists(newName.c_str()))
|
||||||
{
|
{
|
||||||
std::cout << "rm [" << newName << "]\n";
|
std::cout << "rm [" << newName << "]\n";
|
||||||
cmSystemTools::RemoveFile(newName.c_str());
|
cmSystemTools::RemoveFile(newName.c_str());
|
||||||
}
|
}
|
||||||
|
std::cout << "ln -s [" << file << "] [";
|
||||||
|
std::cout << newName << "]\n";
|
||||||
cmSystemTools::CreateSymlink(file.c_str(),
|
cmSystemTools::CreateSymlink(file.c_str(),
|
||||||
newName.c_str());
|
newName.c_str());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue