diff --git a/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java b/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java
index d73ab83a..d174040a 100644
--- a/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java
+++ b/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java
@@ -151,6 +151,16 @@ public class ApplicationSettings {
String localPort = prefs.getString("server_localport_" + order, "");
if (localPort.equals(""))
localPort = port; // Default to the normal (non-local) port
+ try {
+ Integer.parseInt(port);
+ } catch (NumberFormatException e) {
+ port = Integer.toString(Daemon.getDefaultPortNumber(type, ssl));
+ }
+ try {
+ Integer.parseInt(localPort);
+ } catch (NumberFormatException e) {
+ localPort = port;
+ }
return new ServerSetting(order,
prefs.getString("server_name_" + order, null),
diff --git a/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java b/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java
index 3da8d9dc..b1f51b8c 100644
--- a/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java
+++ b/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java
@@ -447,11 +447,14 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
andftpStart.putExtra("local_folder", "/sdcard/Download");
for (int f = 0; f < checked.size(); f++) {
String file = checked.get(f).getRelativePath();
- // If the file is directly in the root, AndFTP fails if we supply the proper path (like /file.pdf)
- // Work around this bug by removing the leading / if no further directories are used in the path
- if (file.startsWith("/") && file.indexOf("/", 1) < 0)
- file = file.substring(1);
- andftpStart.putExtra("remote_file" + (f + 1), file);
+ if (file != null) {
+ // If the file is directly in the root, AndFTP fails if we supply the proper path (like
+ // /file.pdf)
+ // Work around this bug by removing the leading / if no further directories are used in the path
+ if (file.startsWith("/") && file.indexOf("/", 1) < 0)
+ file = file.substring(1);
+ andftpStart.putExtra("remote_file" + (f + 1), file);
+ }
}
if (andftpStart.resolveActivity(getActivity().getPackageManager()) != null) {
startActivity(andftpStart);
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index ca5e8596..441354bc 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -277,8 +277,8 @@ along with Transdroid. If not, see .
Импортировать настройки
%1$s импорт настроек сервера, веб-поиска, RSS и системы из %2$s
Настройки успешно импортированы
-Настройки экспорта
-%1$s экспорт настроек сервера (включая пароли), веб-поиска, RSS и системы в текст файл JSON :%2$s
+Экспортировать настройки
+%1$s экспорт настроек сервера (включая пароли), веб-поиска, RSS и системы в текстовый файл JSON :%2$s
Настройки успешно экспортированы
Помощь