From 4c0e779c1abcff8bcf832ef4a52f18ce6eff912e Mon Sep 17 00:00:00 2001 From: bhklein Date: Wed, 16 Mar 2022 22:12:03 +0000 Subject: [PATCH] csv quote fix --- openbr/plugins/gallery/csv.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openbr/plugins/gallery/csv.cpp b/openbr/plugins/gallery/csv.cpp index 8645470..a4c6909 100644 --- a/openbr/plugins/gallery/csv.cpp +++ b/openbr/plugins/gallery/csv.cpp @@ -203,8 +203,12 @@ class csvGallery : public FileGallery } else { for (qint64 i = 0; i < this->readBlockSize && !f.atEnd(); i++) { QVariantList values; - foreach (const QString &value, QtUtils::parse(f.readLine(), ',')) - values.append(QtUtils::fromString(value)); + foreach (const QString &value, QtUtils::parse(f.readLine(), ',')) { + QString s = value; + if (s.startsWith("\"")) + s.replace("\"", ""); + values.append(QtUtils::fromString(s)); + } File in; in.name = values.first().toString(); -- libgit2 0.21.4