Summary: | quanta can not open empty files created by touch | ||
---|---|---|---|
Product: | quanta | Reporter: | Thilo Bangert <thilo.bangert> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.1.1 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Thilo Bangert
2003-04-25 23:47:21 UTC
Subject: QUANTA_3_1_BRANCH: quanta CVS commit by amantia: Allow opening of empty local files. [#57718] CCMAIL: 57718-done@bugs.kde.org CCMAIL: tamas@komaromi-komaromi.hu M +1 -0 ChangeLog 1.90.2.63 M +20 -15 quanta/quantacommon.cpp 1.29.2.6 M +3 -3 quanta/treeviews/filemanage.cpp 1.15.2.2 --- quanta/ChangeLog #1.90.2.62:1.90.2.63 @@ -22,4 +22,5 @@ - fix the DTD tag files, add warning if they contain syntax errors - use the Attribute Quotation setting + - allow opening of empty local files [#57718] - usability enhancements: - bring up the message output window, when and action/plugin wants to printed --- quanta/quanta/quantacommon.cpp #1.29.2.5:1.29.2.6 @@ -411,4 +411,7 @@ Format QuantaCommon::findFormatByFileCon result.text = v.toBool(); + if (mime->name().startsWith("inode/")) + return result; + QFile f(fileName); if (f.open(IO_ReadOnly)) @@ -419,4 +422,6 @@ Format QuantaCommon::findFormatByFileCon result.compression = Format::GZipCompression; } + if ((ulong) f.size() == 0) + result.text = true; return result; } |