Skip to content

Commit

Permalink
create avatars directory during compression in case is does not exist…
Browse files Browse the repository at this point in the history
… yet
  • Loading branch information
repolevedavaj committed May 22, 2022
1 parent 1cad896 commit af9020b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/repositories/ImageRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ImageRepository {
}

async compressAllImages() {
await FileSystem.makeDirectoryAsync(PLANT_AVATARS_DIRECTORY, {intermediates: true});
for (const image of (await FileSystem.readDirectoryAsync(PLANT_AVATARS_DIRECTORY))) {
const imageUri = `${PLANT_AVATARS_DIRECTORY}/${image}`;

Expand Down

0 comments on commit af9020b

Please sign in to comment.