diff options
Diffstat (limited to 'src/filetree.cpp')
| -rw-r--r-- | src/filetree.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/filetree.cpp b/src/filetree.cpp index e5ea4e9d..45c21c7f 100644 --- a/src/filetree.cpp +++ b/src/filetree.cpp @@ -438,30 +438,7 @@ void FileTree::dumpToFile() const return; } - QFile out(file); - - if (!out.open(QIODevice::WriteOnly)) { - QMessageBox::critical( - m_tree->window(), tr("Error"), tr("Failed to open file '%1': %2") - .arg(file) - .arg(out.errorString())); - - return; - } - - try - { - dumpToFile(out, "Data", *m_core.directoryStructure()); - } - catch(DumpFailed&) - { - // try to remove it silently - if (out.exists()) { - if (!out.remove()) { - log::error("failed to remove '{}', ignoring", file); - } - } - } + m_core.directoryStructure()->dump(file.toStdWString()); } void FileTree::dumpToFile( |
