mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-29 17:23:59 +00:00
Say where a missing snippet reference is read from
A reference is snippet/<name>, a file below snippet/<snippet folder>/. A pack still written as snippet/decorator/bush, in the layout from before the folder was iris/decorant/decorator, was reported as having no file snippet/iris/decorant/decorator/decorator/bush.json, which reads like a doubled path in the lookup. The lookup is right; the message now names the folder the name is relative to.
This commit is contained in:
1 parent
28d9c34dd2
commit
ce7f782561
2 files changed
+15
-1
No files matched your search
@@ -377,7 +377,8 @@ public final class ModuleSettingsDecoder {
|
||||
Path folder = packFolder.resolve(SNIPPET_FOLDER).resolve(snippetFolder).normalize();
|
||||
Path file = folder.resolve(snippetName(snippetFolder, reference) + JSON_EXTENSION).normalize();
|
||||
if (!file.startsWith(folder) || !Files.isRegularFile(file)) {
|
||||
throw new JsonParseException("Snippet " + reference + " has no file " + packFolder.relativize(file));
|
||||
throw new JsonParseException("Snippet " + reference + " has no file " + packFolder.relativize(file)
|
||||
+ "; a snippet reference names a file below " + SNIPPET_FOLDER + "/" + snippetFolder + "/");
|
||||
}
|
||||
try {
|
||||
return Files.readString(file);
|
||||
|
||||
Reference in new issue
Block a user