]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
bug with extension in the filename
authortcit <tcit@tcit.fr>
Thu, 24 Jul 2014 23:38:28 +0000 (01:38 +0200)
committertcit <tcit@tcit.fr>
Thu, 24 Jul 2014 23:38:28 +0000 (01:38 +0200)
inc/poche/WallabagEBooks.class.php

index a12befa8ba81b63afa8e670bb8f1dc2aaf48ed68..5f42308ebd108d88ebb40ecd485acf8aba7cf048 100644 (file)
@@ -185,7 +185,7 @@ class WallabagMobi extends WallabagEBooks
             // we send file to kindle
 
             $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;
             $mobi->save($file);