mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: skip system file when saving opened files before close
This commit is contained in:
parent
30dfc24a28
commit
a5e7fc18ab
@ -2060,6 +2060,13 @@ void VMainWindow::closeEvent(QCloseEvent *event)
|
||||
fileInfos.reserve(tabs.size());
|
||||
|
||||
for (auto const & tab : tabs) {
|
||||
// Skip system file.
|
||||
VFile *file = tab.m_editTab->getFile();
|
||||
if (file->getType() == FileType::Orphan
|
||||
&& dynamic_cast<VOrphanFile *>(file)->isSystemFile()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
VFileSessionInfo info = VFileSessionInfo::fromEditTabInfo(&tab);
|
||||
fileInfos.push_back(info);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user