Skip to content

Commit

Permalink
Exit with error when dir not found in expanded mode // fixes #525
Browse files Browse the repository at this point in the history
  • Loading branch information
tofi86 committed Jan 3, 2017
1 parent e55039c commit e42d189
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/com/adobe/epubcheck/tool/EpubChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,15 @@ private int processFile(Report report)
{
if (expanded)
{
Archive epub;
// check existance of path (fix #525)
File f = new File(path);
if (!f.exists())
{
System.err.println(String.format(Messages.get("directory_not_found"), path));
return 1;
}

Archive epub;
try
{
epub = new Archive(path, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ validating_version_message=Validating using EPUB version %1$s rules.
output_type_conflict=Only one output format can be specified at a time.
validating_against_epub_version=Validating against EPUB version %1$s - custom validation
file_not_found=File not found: '%1$s'
directory_not_found=Directory not found: '%1$s'
epubcheck_completed=epubcheck completed
error_creating_config_file=Error creating config file '%1$s'.
expected_message_filename=Expected the Custom message file name, but found '%1$s'
Expand Down

0 comments on commit e42d189

Please sign in to comment.