Only copy to .DirIcon if it does not exist yet

This commit is contained in:
probonopd
2017-03-28 07:32:14 +02:00
parent 038ea01bdc
commit 6e8bdab10f
+4 -4
View File
@@ -285,19 +285,19 @@ int main(int argc, char **argv)
QString preExistingToplevelIcon = "";
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".xpm").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".xpm";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".svgz").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".svgz";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".svg").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".svg";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(QFileInfo(appDirPath + "/" + desktopIconEntry + ".png").exists() == true){
preExistingToplevelIcon = appDirPath + "/" + desktopIconEntry + ".png";
QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
if(QFileInfo(appDirPath + "/.DirIcon").exists() == false) QFile::copy(preExistingToplevelIcon, appDirPath + "/.DirIcon");
}
if(preExistingToplevelIcon != ""){