1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-12-02 13:52:18 -05:00

bug with extension in the filename

This commit is contained in:
tcit 2014-07-25 01:38:28 +02:00
parent dc59f164a9
commit d49446ff98

View File

@ -185,7 +185,7 @@ class WallabagMobi extends WallabagEBooks
// we send file to kindle // we send file to kindle
$char_in = array('/', '.', ',', ':', '|'); # we sanitize filename to avoid conflicts with special characters (for instance, / goes for a directory) $char_in = array('/', '.', ',', ':', '|'); # we sanitize filename to avoid conflicts with special characters (for instance, / goes for a directory)
$mobiExportName = preg_replace('/\s+/', '-', str_replace($char_in, '-', $this->bookFileName . '.mobi')); $mobiExportName = preg_replace('/\s+/', '-', str_replace($char_in, '-', $this->bookFileName)) . '.mobi';
$file = 'cache/' . $mobiExportName; $file = 'cache/' . $mobiExportName;
$mobi->save($file); $mobi->save($file);