From 610b963f57772c48bf468122d5ca9425b3a92532 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 20 Jul 2023 18:24:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20UOS=E9=9D=9EAD=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E5=B8=90=E6=88=B7=E5=88=A0=E9=99=A4AD=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E8=B4=A6=E6=88=B7=E5=90=8Ehome=E7=9B=AE=E5=BD=95=E4=B8=8B?= =?UTF-8?q?=E7=9A=84AD=E5=9F=9F=E8=B4=A6=E6=88=B7=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=90=8C=E6=AD=A5=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit daemon删除用户目录后dconfig-daemon创建了指定用户路径 修改为当用户目录不存在时不进行相应操作,避免错误的创建目录 Log: 修复UOS非AD域名帐户删除AD域名账户后home目录下的AD域账户目录没有同步删除 Influence: 控制中心-账户-删除用户目录 Bug: https://pms.uniontech.com/bug-view-185841.html Change-Id: Ibe6dd08b0227bc41beef66834d519c30b4e8f7ef --- src/dconfigfile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dconfigfile.cpp b/src/dconfigfile.cpp index a1b756f6..59190eb5 100644 --- a/src/dconfigfile.cpp +++ b/src/dconfigfile.cpp @@ -1054,7 +1054,7 @@ class Q_DECL_HIDDEN DConfigCacheImpl : public DConfigCache { homePath = DStandardPaths::homePath(getuid()); } - if (homePath.isEmpty()) + if (homePath.isEmpty() || !QDir().exists(homePath)) return QString(); // fallback to default application cache directory. @@ -1212,7 +1212,7 @@ bool DConfigCacheImpl::save(const QString &localPrefix, QJsonDocument::JsonForma cacheChanged = false; const QString &dir = getCacheDir(localPrefix); if (dir.isEmpty()) { - qCWarning(cfLog, "Falied on saveing, the config cache directory is empty for the user[%d], " + qCWarning(cfLog, "Failed on saving, the config cache directory is empty for the user[%d], " "the current user[%d].", userid, getuid()); return false; } @@ -1224,7 +1224,7 @@ bool DConfigCacheImpl::save(const QString &localPrefix, QJsonDocument::JsonForma } if (!cache.open(QIODevice::WriteOnly)) { - qCWarning(cfLog, "Falied on saveing data when open file: \"%s\", error message: \"%s\"", + qCWarning(cfLog, "Failed on saving data when open file: \"%s\", error message: \"%s\"", qPrintable(cache.fileName()), qPrintable(cache.errorString())); return false; }