Skip to content

Commit

Permalink
fix: issue with OSX hidden folder
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Apr 6, 2022
1 parent 962ec3d commit 48d0d8b
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ interface Callback {
void callback(JSONObject jsonObject);
}

FilenameFilter filter = new FilenameFilter() {
@Override
public boolean accept(File f, String name) {
// ignore directories generated by mac os x
return !name.startsWith("__MACOSX") && !name.startsWith(".") && !name.startsWith(".DS_Store");
}
};

public class CapacitorUpdater {
public String statsUrl = "";
public String appId = "";
Expand Down Expand Up @@ -152,7 +160,7 @@ private Boolean flattenAssets(String source, String dest) {
}
File fDest = new File(this.context.getFilesDir() + "/" + dest);
fDest.getParentFile().mkdirs();
String[] pathsName = current.list();
String[] pathsName = current.list(filter);
if (pathsName == null || pathsName.length == 0) {
return false;
}
Expand Down

0 comments on commit 48d0d8b

Please sign in to comment.