FileNotFoundException while unzipping a file
<p>I have this code that's supposed to unzipp a file.</p>

<pre><code>public class dec extends Activity {

    @Override
        public void onCreate(Bundle savedInstanceState) {

            super.onCreate(savedInstanceState);

            Toast.makeText(this, "hello, starting to unZipp!", 15500).show();

            String location = Environment.getExternalStorageDirectory() + "/unzipped/"; 
            /////////////////////////////////////////////////////////////////////

            try  { 

                ZipInputStream zin = new ZipInputStream(getAssets().open("totalkeys.zip")); 

                ZipEntry ze = null; 

                while ((ze = zin.getNextEntry()) != null) { 
                  Log.v("Decompress", "My UNZIPPING: " + ze.getName()); 
                  if(ze.isDirectory()) { 
                    dirChecker(ze.getName()); 
                  } else { 
                    FileOutputStream fout = new FileOutputStream(location + ze.getName()); 
                    for (int c = zin.read(); c != -1; c = zin.read()) { 
                      fout.write(c); 
                    } 

                    zin.closeEntry(); 
                    fout.close(); 
                  } 

                } 
                zin.close(); 

              } catch(Exception e) { 
                Log.v("Decompress", "My ERROR: "+e.toString()); 
                /// throws My ERROR: java.io.FileNotFoundException: /mnt/sdcard/unzipped/Eng_blue/altlayout.txt (No such file or directory)
                /// and dies.
              } 
            } 

            ////////////////////////////////////////////////////

            private void dirChecker(String dir) { 

              String location = Environment.getExternalStorageDirectory() + "/unzipped/"; 
              File f = new File(location + dir); 

              if(!f.isDirectory()) { 
                f.mkdirs(); 
              } 

            ////////////////////////////////////////////////////

            finish();

    }

}
</code></pre>

<p>Yet it only throws "ava.io.FileNotFoundException: /mnt/sdcard/unzipped/Eng_blue/altlayout.txt" which is the name of the first file and dies.</p>

<p>I thought that dirChecker() method would create this folders on the flow... any ideas how to fix that?</p>

<p>Thanks!</p>
