Skip to content

Commit

Permalink
Add (DIR) label to file list
Browse files Browse the repository at this point in the history
  • Loading branch information
AozoraDev committed Nov 10, 2023
1 parent f7fa0df commit ad59d02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/main/java/com/harubyte/mitobi/Mitobi.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ private String getFilesList(File files) {
StringBuilder sb = new StringBuilder();
for (File file : files.listFiles()) {
String path = file.getAbsolutePath().replaceAll(mainPath, "");
sb.append("\n- " + path);
sb.append("\n- " + path + " ");
sb.append(file.isDirectory() ? "(DIR)" : "");
if (file.isDirectory() && file.list().length > 0) sb.append(getFilesList(file));
}

Expand Down

0 comments on commit ad59d02

Please sign in to comment.