[PATCH] Treat empty files like text files
David Faure
dfaure at klaralvdalens-datakonsult.se
Thu May 1 15:12:05 BST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 01 May 2003 15:51, Andras Mantia wrote:
> On Thursday 2003 May 01 16:27, David Faure wrote:
> > On Thursday 01 May 2003 15:01, Andras Mantia wrote:
> > > Hi,
> > >
> > > The attached tiny patch makes sure that (local) empty files are treated
> > > as text ones.
> >
> > Why that, given that there is an application/x-zerosize mimetype for this
> > very purpose?
>
> Oh, I wasn't aware of that. Does it work for remote files, when querying with
> KMimeType::findByURL?
No, since that method only knows the URL and doesn't stat nor download the file.
Accurate mimetype determination for remote files can only be done with
MimetypeJob *KIO::mimetype( url );
- --
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+sStP72KcVAmwbhARAmfwAJ9Bik+aQ6qQNRXDlqi4F9Bk1JolqgCdHalS
Hco20SXa6HqKUAlRvtm05qM=
=o7gi
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list