Not sure how long these changes will take to filter into official deployed Calibre, but I still have the file-destructive version of ebook-viewer on my system. I made this easy workaround as an alternative to hacking the program:
Save this shell script as ebook-viewer somewhere on the path BEFORE /usr/bin/ebook-viewer:
Code:
#! /bin/bash
# The ebook-viewer utility of the Calibre project MODIFIES ANY EPUB
# DOCUMENT THAT'S OPENED WITH IT. A bookmarks file is inserted into
# the book. I know of no way at this time to prevent it from doing so
# short of turning off all write bits on the files or hacking the
# program.
# This script is a crude solution, let ebook-viewer touch a junk copy
# of the book in /tmp
tmpFile="/tmp/$(basename $1)"
cp $1 $tmpFile
/usr/bin/ebook-viewer $tmpFile
rm $tmpFile