From f1ce5825aae753b091956358ea255ed0c99bafa3 Mon Sep 17 00:00:00 2001 From: iaom Date: Thu, 15 Jul 2021 21:03:07 +0800 Subject: [PATCH] Add step for check index path permission. --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 3b720aa..c139916 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -180,6 +180,12 @@ int main(int argc, char *argv[]) { syslog(LOG_ERR, "集中管控目录未挂载!!\n"); ::sleep(1); } + while(!QFileInfo("/media/用户保险箱").permission(QFileDevice::WriteUser)) { + qWarning() << "/media/用户保险箱 无写入权限!!"; + printf("/media/用户保险箱 无写入权限!!"); + syslog(LOG_ERR, "/media/用户保险箱 无写入权限!!\n"); + ::sleep(1); + } // Output log to file