cops icon indicating copy to clipboard operation
cops copied to clipboard

Colon in filename prevents kobo from seeing .kepub.epub files

Open tobybryans opened this issue 10 years ago • 2 comments

I recently enabled the provision of .kepub.epub files and it works great, except that my kobos don't see any files with a colon in the filename. To fix it I changed the following in data.php:

    public function getUpdatedFilenameKepub () {
        $str = $this->getUpdatedFilename () . ".kepub.epub";
        return str_replace( ":", "-", $str );
    }

There's probably a better way of doing this, I've not written php for a long time and I'm not sure if this is the appropriate place to make this change but it now works well for me!

tobybryans avatar Apr 17 '16 08:04 tobybryans

Your change is clean enough for my taste, could you make a pull request, I'll merge it soon.

another question did you test other strange characters (;:!&$£ ...) or did you simply have a colon in a file ?

seblucas avatar Apr 18 '16 14:04 seblucas

Will do. Good thought on the other characters - before I do the pull request I'll test some other common ones.

tobybryans avatar Apr 18 '16 14:04 tobybryans