Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Add a dependency to be able to rename ebook (File::Copy)

- add the code to rename the ebook if necessary
  • Loading branch information...
commit 51dc35f3fa78e9e01c5dde4f2f84289378e30e2e 1 parent 4b80563
manu authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/Mobigen/Command.pm
View
8 lib/Mobigen/Command.pm
@@ -19,6 +19,7 @@ __PACKAGE__->mk_accessors(
use File::Basename;
use File::Spec;
+use File::Copy;
use IPC::Run qw( start );
use Carp qw( carp );
@@ -149,12 +150,13 @@ sub execute {
return;
}
else {
- finish $h or do {
+ finish $h or do { # it's quite rare mobigen return something else that a true value
$self->error($self->stderr);
+ $self->_rename_output_file() if $self->output_file;
return;
};
- }
-
+ }
+
$self->_rename_output_file() if $self->output_file;
return 1;
Please sign in to comment.
Something went wrong with that request. Please try again.