1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-11-23 01:06:17 +00:00

Fix for NPEs if the target directory does not exist.

This commit is contained in:
Fabian Schlenz 2016-07-05 07:56:18 +02:00
parent b3018ad10e
commit cf6ffc4c60

View File

@ -9,7 +9,7 @@ public class Utils {
Vector<String> accounts = new Vector<String>(); Vector<String> accounts = new Vector<String>();
File folder = new File(Config.FILE_BASE); File folder = new File(Config.FILE_BASE);
File[] files = folder.listFiles(); File[] files = folder.listFiles();
for (File f : files) { if (files != null) for (File f : files) {
if (f.isDirectory() && f.getName().startsWith("+")) { if (f.isDirectory() && f.getName().startsWith("+")) {
accounts.add(f.getName()); accounts.add(f.getName());
} }