one more fix

This commit is contained in:
Loki 2012-05-27 08:28:03 +03:00
parent 3f502aedae
commit 41aae07021

View file

@ -97,7 +97,7 @@ public class FileHelper {
try { try {
InputStream in = urlConnection.getInputStream(); InputStream in = urlConnection.getInputStream();
File f = new File(filename); File f = new File(filename);
if (!f.exists()) { if (!f.exists() && f.getParentFile() != null) {
f.getParentFile().mkdirs(); f.getParentFile().mkdirs();
System.out.println("Directories have been created: " + f.getParentFile().getPath()); System.out.println("Directories have been created: " + f.getParentFile().getPath());
} }