summaryrefslogtreecommitdiffstats
path: root/src/fetch/arxivfetcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fetch/arxivfetcher.cpp')
-rw-r--r--src/fetch/arxivfetcher.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fetch/arxivfetcher.cpp b/src/fetch/arxivfetcher.cpp
index f59d246..ec3f8fb 100644
--- a/src/fetch/arxivfetcher.cpp
+++ b/src/fetch/arxivfetcher.cpp
@@ -226,6 +226,13 @@ Tellico::Data::EntryPtr ArxivFetcher::fetchEntry(uint uid_) {
}
}
}
+ TQRegExp versionRx(TQString::fromLatin1("v\\d+$"));
+ // if the original search was not for a versioned ID, remove it
+ if(m_key != ArxivID || !m_value.contains(versionRx)) {
+ TQString arxiv = entry->field(TQString::fromLatin1("arxiv"));
+ arxiv.remove(versionRx);
+ entry->setField(TQString::fromLatin1("arxiv"), arxiv);
+ }
return entry;
}