refactor(directory): propagate dir creation error to caller

This commit is contained in:
2026-06-20 01:27:51 +01:00
parent 8602f65db7
commit 37e9b6c1e7
3 changed files with 11 additions and 16 deletions

View File

@@ -59,15 +59,10 @@ public class DirectoryService {
return file;
}
public File getVodFile(String filename) {
public File getVodFile(String filename) throws IOException {
String dir = outputDir + File.separator + "vods" + File.separator + filename;
File file = new File(dir);
try {
createDirectory(file.getParent());
} catch (IOException e) {
logger.error("Error creating vods directory: {}", e.getMessage());
}
createDirectory(file.getParent());
return file;
}