mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
Update app/common/src/main/java/stirling/software/common/util/GeneralUtils.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
5e86fc0d66
commit
768f695f6b
@ -448,6 +448,10 @@ public class GeneralUtils {
|
||||
* path.
|
||||
*/
|
||||
public static Path extractScript(String scriptName) throws IOException {
|
||||
// Validate input
|
||||
if (scriptName == null || scriptName.trim().isEmpty()) {
|
||||
throw new IllegalArgumentException("scriptName must not be null or empty");
|
||||
}
|
||||
// 1. load the script from classpath
|
||||
ClassPathResource resource = new ClassPathResource("static/python/" + scriptName);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user