Commit 8672b29a authored by Sébastien Toque's avatar Sébastien Toque

fix URItoFileName when there is no dot

parent fb8d599a
......@@ -56,7 +56,8 @@ public class Util {
public static String URItoFileName(String URI) {
int sep = URI.lastIndexOf('/');
int dot = URI.lastIndexOf('.');
return Uri.decode(URI.substring(sep + 1, dot));
String name = dot >= 0 ? URI.substring(sep + 1, dot) : URI;
return Uri.decode(name);
}
public static String PathToURI(String path) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment