mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win-nix] fix local theme load
This commit is contained in:
@ -570,8 +570,10 @@ auto CThemes::addLocalTheme(const QJsonObject& jsonobj, const QString& filepath)
|
||||
{
|
||||
if ( m_priv->validateTheme(jsonobj) ) {
|
||||
if ( !filepath.isEmpty() ) {
|
||||
if (!QFile::copy(filepath, Utils::getAppCommonPath() + "/uithemes/" + QFileInfo(filepath).fileName()))
|
||||
return false;
|
||||
const QString dest_dir = Utils::getAppCommonPath() + "/uithemes";
|
||||
if ( QDir(dest_dir).mkpath(".") )
|
||||
if (!QFile::copy(filepath, dest_dir + "/" + QFileInfo(filepath).fileName()))
|
||||
return false;
|
||||
}
|
||||
|
||||
QByteArray data = QJsonDocument(jsonobj).toJson(QJsonDocument::Compact);
|
||||
|
||||
Reference in New Issue
Block a user