Skip to content

Commit

Permalink
Handle File objects correctly in snapshots (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor authored Jan 30, 2024
1 parent 18f5394 commit 17ffed3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public Object convert(Object value, String key) {
if (!path.toFile().exists()) {
throw new RuntimeException("Path " + path.toString() + " not found.");
}
} else if (value instanceof File) {
path = ((File) value).toPath();
if (!path.toFile().exists()) {
throw new RuntimeException("Path " + path.toString() + " not found.");
}
} else {
path = new File(value.toString()).toPath();

Expand Down

0 comments on commit 17ffed3

Please sign in to comment.