Skip to content

Commit

Permalink
Remove directory reference from Android (youtube#3892)
Browse files Browse the repository at this point in the history
b/302730696
  • Loading branch information
madhurajayaraman authored Jul 25, 2024
1 parent 3c51935 commit ff5848d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions starboard/android/shared/file_can_open.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "starboard/file.h"

#include <android/asset_manager.h>
#include <dirent.h>

#include "starboard/directory.h"

Expand All @@ -34,9 +35,9 @@ bool SbFileCanOpen(const char* path, int flags) {
SbFileClose(file);

if (!result) {
SbDirectory directory = SbDirectoryOpen(path, NULL);
result = SbDirectoryIsValid(directory);
SbDirectoryClose(directory);
DIR* directory = opendir(path);
result = directory != nullptr;
closedir(directory);
}

return result;
Expand Down

0 comments on commit ff5848d

Please sign in to comment.