From d8a205fbe5f06c8da93bfc2063a5a0104f3f89fa Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 2 Apr 2023 18:38:07 +0200 Subject: [PATCH] fixup! shared: FileSaver: addFile(): Consider fillExistingContentless --- shared/filesaver.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shared/filesaver.cpp b/shared/filesaver.cpp index bd41066..74a1fed 100644 --- a/shared/filesaver.cpp +++ b/shared/filesaver.cpp @@ -146,10 +146,7 @@ SaveFileResult FileSaver::saveFile(const QFileInfo &fileInfo) if(mustFillContent) { auto filetype = this->dbService->queryFileType(fileInfo.absolutePath()); - if(filetype) - { - mustFillContent = filetype.value() == 'c'; - } + mustFillContent = !filetype.has_value() || filetype.value() == 'c'; } }