https://bugs.kde.org/show_bug.cgi?id=378449
Albert Astals Cid <aa...@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |NOT A BUG --- Comment #18 from Albert Astals Cid <aa...@kde.org> --- (In reply to Jonathan Verner from comment #17) > (In reply to Albert Astals Cid from comment #16) > > > Pointing to lines of code is bad, he pretends like he understands the code, > > which he doesn't, so it makes him less credible. > > I know some user comments may be frustrating, but IMHO a reply implying bad > faith ("pretends") and lack of skill ("he doesn't understand code") does > more damage than good and goes against the KDE code of conduct. Don't bring the code of conduct here, that's silly. > I'd suggest > you ignore the bug if the user comments brush you the wrong way and you > can't reply in a positive way (which is HARD, I admit). No, because the user then may then go on saying "see they're shit as i said", so if the user is ignoring my questions and comments i will call him on it. > As far as the bug goes, I can now reproduce it. The problem seems to be that > okular only looks at the contents when the etension either is not registered > in the system mimetype database at all or it is registered to a mimetype > which Okular has a plugin for. If it is and the extension does not > correspond to the file contents, okular fails opening the file: > > $ okular test.pdf > $ mv test.pdf test.ods > $ okular test.ods > $ mv test.ods test.non_registered_ext > $ okular test.non_registered_ext > $ mv test.non_registered_ext test.txt > $ okular test.txt > > Only the third line fails for me (because ods is registered as an extension > of mime type 'application/vnd.oasis.opendocument.spreadsheet' on my system > and okular has no plugin for it) > > > provide a patch that fixes the issue for him, he should stop pointing to the > > code and start trying to help us reproduce the issue. > > Actually, pointing to the code made it easier for me to go over it (I > wouldn't bother without the link). It seems there really is a bug there: > > https://github.com/KDE/okular/blob/21836ba072b2d4189f1257af06c11f134f2edc31/ > core/document.cpp#L2417 > > should use the 'QMimeDatabase::MatchContent' mode instead of > 'QMimeDatabase::MatchExtension'. Yes, that is correct, whoever ported that code make a mistake. I'll fix it. *BUT* I'm still going to close this (NOT A BUG because i can't find a better option), since we're not going to "fall back to pdf when the file type cannot be inferred" since it makes no sense. -- You are receiving this mail because: You are watching all bug changes.