git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
e621: fix search-pool urls
[fanfix.git]
/
supported
/
InfoReader.java
diff --git
a/supported/InfoReader.java
b/supported/InfoReader.java
index 1a00ef25f6102d8928f2a1c213f2afe66dc4c01e..405b28fb4197be856192e3b8ad31a219f4636cc5 100644
(file)
--- a/
supported/InfoReader.java
+++ b/
supported/InfoReader.java
@@
-259,14
+259,17
@@
public class InfoReader {
String value = getLine(in, key, 0);
if (value != null && !value.isEmpty()) {
value = value.trim().substring(key.length() - 1).trim();
String value = getLine(in, key, 0);
if (value != null && !value.isEmpty()) {
value = value.trim().substring(key.length() - 1).trim();
- if (value.startsWith("'") && value.endsWith("'")
- || value.startsWith("\"") && value.endsWith("\"")) {
+ if (value.length() > 1 && //
+ (value.startsWith("'") && value.endsWith("'")
+ || value.startsWith("\"")
+ && value.endsWith("\""))) {
value = value.substring(1, value.length() - 1).trim();
}
// Some old files ended up with TITLE="'xxxxx'"
value = value.substring(1, value.length() - 1).trim();
}
// Some old files ended up with TITLE="'xxxxx'"
- if ("TITLE".equals(key)) {
- if (value.startsWith("'") && value.endsWith("'")) {
+ if ("^TITLE=".equals(key)) {
+ if (value.startsWith("'") && value.endsWith("'")
+ && value.length() > 1) {
value = value.substring(1, value.length() - 1).trim();
}
}
value = value.substring(1, value.length() - 1).trim();
}
}