sromku / android-storage

Create, read, delete, append, encrypt files and more, on internal or external disk spaces with a really simple API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

isDirectoryExists() always returns true

appoll opened this issue · comments

The result of calling the isDirectoryExists() method on an instance of the internal storage is always true.

Easily checked by writing an androidTest:

@Before
public void setup() {
    Context context = InstrumentationRegistry.getTargetContext();
    storage = SimpleStorage.getInternalStorage(context);
}

@Test
public void shouldCreateTypedFolder() {
    storage.deleteDirectory("sub-" + Type.ONE);
    storage.deleteDirectory("sub-" + Type.ALL);

    // below fails
    assertFalse(storage.isDirectoryExists("sub-" + Type.ALL));

Fixed in latest version. Same issue #10.