mirror of https://gitee.com/openkylin/peony.git
[FIX] #97517 【文件保护箱】在加密文件保护箱中创建文件,需刷新后才会显示
This commit is contained in:
parent
52f19799b0
commit
e02737258c
|
@ -53,6 +53,18 @@ FileWatcher::FileWatcher(QString uri, QObject *parent, bool isWatchMovesFlag)
|
|||
creatorMonitor();
|
||||
|
||||
FileOperationManager::getInstance()->registerFileWatcher(this);
|
||||
|
||||
// fix 97517, could not monitor filesafe box directory changement after unmounted and mount again.
|
||||
connect(this, &FileWatcher::directoryUnmounted, this, [=](const QString &uri){
|
||||
if (FileUtils::isSamePath(m_uri, uri)) {
|
||||
if (m_monitor) {
|
||||
g_file_monitor_cancel(m_monitor);
|
||||
}
|
||||
if (m_dir_monitor) {
|
||||
g_file_monitor_cancel(m_dir_monitor);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
FileWatcher::~FileWatcher()
|
||||
|
|
Loading…
Reference in New Issue