Improved errors publishing IGs

This commit is contained in:
Grahame Grieve 2023-12-22 21:23:17 +11:00
parent 0fdb8e767a
commit 74893e42e7
2 changed files with 14 additions and 1 deletions

View File

@ -161,7 +161,11 @@ public class TextFile {
}
public static String fileToString(String src) throws FileNotFoundException, IOException {
FileInputStream fs = new FileInputStream(new CSFile(src));
CSFile f = new CSFile(src);
if (!f.exists()) {
throw new IOException("File "+src+" not found");
}
FileInputStream fs = new FileInputStream(f);
try {
return streamToString(fs);
} finally {

View File

@ -351,5 +351,14 @@ public class PackageList {
return list;
}
public boolean hasPath(String pathVer) {
for (PackageListEntry t : versions) {
if (t.path() != null && t.path().equals(pathVer)) {
return true;
}
}
return false;
}
}