Summary: | When passing .kmy file as an argument, do not pass it further to WebConnect | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Dawid Wróbel <me> |
Component: | importer | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | CONFIRMED --- | ||
Severity: | major | ||
Priority: | NOR | ||
Version: | 5.1.1 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: |
Description
Dawid Wróbel
2021-04-09 17:25:07 UTC
It's not only .kmy but could also be .xml. In fact, using .xml as argument to KMyMoney does not open the .xml file but opens the most recent used file and then tries to import the .xml as CSV. The plugin detection introduced with commit 403529b3 is broken :( The following change in "bool CSVImporter::isMyFormat(const QString& filename) const" breaks it: - return filename.endsWith(QLatin1String(".csv"), Qt::CaseInsensitive) - && f.open(QIODevice::ReadOnly | QIODevice::Text); + return f.open(QIODevice::ReadOnly | QIODevice::Text); Any file that can be opened as read-only returns true here. And it turns out to be even worse: passing xxx.ofx as argument to import using the OFX importer causes the CSV importer to start. Yes, that change you quoted is what I introduced yesterday and Brendan Coupe reported a resulting bug on the same day. The MR 71 fixes that. However, that change actually exposed the misbehavior, which this Bug intends to track. I believe that once the file is considered as "importable", the file processing logic should not continue to check if it is "loadable". |