flameshot-once: alter flameshot packing char

This allows deleting images uploaded to htgen-imgur <1.2.0
This commit is contained in:
tv 2023-02-05 01:13:56 +01:00
parent 23b63bfdfb
commit 8056151181
2 changed files with 29 additions and 0 deletions

View File

@ -11,5 +11,6 @@ pkgs.flameshot.overrideAttrs (old: rec {
};
patches = old.patches or [] ++ [
./flameshot-12.imgur.patch
./flameshot-12.history.patch
];
})

View File

@ -0,0 +1,28 @@
diff --git a/src/utils/history.cpp b/src/utils/history.cpp
index f3ee09d0..7c85c34b 100644
--- a/src/utils/history.cpp
+++ b/src/utils/history.cpp
@@ -76,9 +76,9 @@ const HistoryFileName& History::unpackFileName(const QString& fileNamePacked)
int nPathIndex = fileNamePacked.lastIndexOf("/");
QStringList unpackedFileName;
if (nPathIndex == -1) {
- unpackedFileName = fileNamePacked.split("-");
+ unpackedFileName = fileNamePacked.split("|");
} else {
- unpackedFileName = fileNamePacked.mid(nPathIndex + 1).split("-");
+ unpackedFileName = fileNamePacked.mid(nPathIndex + 1).split("|");
}
switch (unpackedFileName.length()) {
@@ -109,9 +109,9 @@ const QString& History::packFileName(const QString& storageType,
if (storageType.length() > 0) {
if (deleteToken.length() > 0) {
m_packedFileName =
- storageType + "-" + deleteToken + "-" + m_packedFileName;
+ storageType + "|" + deleteToken + "|" + m_packedFileName;
} else {
- m_packedFileName = storageType + "-" + m_packedFileName;
+ m_packedFileName = storageType + "|" + m_packedFileName;
}
}
return m_packedFileName;