I believe the && here should be an ||, else it will throw an NPE and allow directories to be unarchived