...to prevent leaving wal/shm files after viewing sqlite database.
The problem I often had with viewing .sqlite files with mc is that
exiting the view mode mid-way may leave .wal/.shm files in the database
directory.
This never caused any actual issues, but a bit annoying, since leftover
.wal files are often a sign that the program working with the database
exited ungracefully.
This effectively reproduces mc's behaviour:
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "/tmp/testsqlite/db file.sqlite" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
'db file.sqlite-shm'
'db file.sqlite-wal'
After the change -- no shm/wal files
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "file:/tmp/testsqlite/db file.sqlite?immutable=1" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
You can find the docs on immutable mode here:
https://www.sqlite.org/uri.html#uriimmutable
Immutable mode has been supported in sqlite since 2014:
https://www.sqlite.org/changes.html#version_3_8_5
In case user's sqlite installation is older, the mode is just quietly
ignored, so the change is backwards compatible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...on systems that have no /bin/cat (like NixOS).
When opening .diff or .patch files mcview invokes /bin/cat. NixOS has no
/bin/cat (the path to cat looks like /run/current-system/sw/bin/cat).
However cat is still in PATH, so replace /bin/cat with just cat. This
should not affect other systems as /bin should normally be in PATH.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
mc.ext: add fb2 support.
ext.f/doc.sh.in: change key name for e-books.
Thanks korrado <anyhow2@mail.ru> for the issue.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
add plenty of missing 'which' commands in ext.d.
the construct 'if <command>' to check the presence of a command would
work in some cases (though inefficiently), but it others it was just
bogus. in every case it was inconsistent and confusing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
RealPlayer is a proprietary application which can't be installed in most
distros and has long been abandoned.
gtv hasn't been developed since 2003.
xanim barely plays anything.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The following patch adds support for opus audio files.
The executable opusinfo is part of opus-tools package.
Xmms and play are able to play opus files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Use Geeqie (a fork of GQview) as main image viewer, fallback to GQview.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Don't show error message for each not-installed program when view
documents in MS Word and Excel formats.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
mplayer is not currently actively developed and some people have long
switched to MPV - use it as a fallback for "mplayer -identify" command.
Also, give the user a hint about mplayer/mpv in case none of them is
installed.
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
ClosesMidnightCommander/mc#134:
* `file -b` prints class file version, which `javap` doesn't by default
* `javap`'s stderr should be suppressed as it may print `_JAVA_OPTIONS`
if this variable is set
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
ogginfo should be shown for MC_EXT_FILENAME like other cases.
Using MC_EXT_SELECTED handles filenames with spaces incorrectly.
Signed-off-by: Alessio Ababilov <ilovegnulinux@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>