Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-08-22 00:02:56 +02:00
commit 84338caacc

View file

@ -4,6 +4,7 @@ import static net.osmand.IndexConstants.BINARY_MAP_INDEX_EXT;
import static net.osmand.IndexConstants.BINARY_SRTM_MAP_INDEX_EXT;
import java.io.File;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -149,7 +150,16 @@ public class DownloadActivityType {
public String getBaseUrl(OsmandApplication ctx, String fileName) {
return "http://" + IndexConstants.INDEX_DOWNLOAD_DOMAIN + "/download?event=2&"
+ Version.getVersionAsURLParam(ctx) + "&file=" + URLEncoder.encode(fileName, "UTF-8"));
+ Version.getVersionAsURLParam(ctx) + "&file=" + encode(fileName);
}
protected String encode(String fileName) {
try {
return URLEncoder.encode(fileName, "UTF-8");
} catch (IOException e) {
return fileName;
}
}