Skip to content

Commit b10e8b2

Browse files
committed
Handle leading / for FileUtility#getResourceFiles(...)
1 parent ca070da commit b10e8b2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main/java/xyz/srnyx/javautilities/FileUtility.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public static void walkAndCopy(@NotNull Path source, @NotNull Path destination)
157157
*/
158158
@NotNull
159159
public static List<String> getResourceFiles(@NotNull String resourcePath) {
160+
if (resourcePath.startsWith("/")) resourcePath = resourcePath.substring(1);
160161
if (!resourcePath.endsWith("/")) resourcePath += "/";
161162
final List<String> files = new ArrayList<>();
162163

0 commit comments

Comments
 (0)