mirror of
https://github.com/bobwen-dev/hunter
synced 2025-04-12 00:55:41 +02:00
check if /tmp/hunter-previews exists before deleting
This commit is contained in:
parent
8cb02c59be
commit
3b80c3b20f
@ -375,9 +375,11 @@ impl Previewer {
|
|||||||
{
|
{
|
||||||
kill_proc().log();
|
kill_proc().log();
|
||||||
// Delete files left by graphical PDF previews, etc.
|
// Delete files left by graphical PDF previews, etc.
|
||||||
std::fs::remove_dir_all("/tmp/hunter-previews/")
|
if std::path::Path::new("/tmp/hunter-previews").exists() {
|
||||||
.map_err(HError::from)
|
std::fs::remove_dir_all("/tmp/hunter-previews/")
|
||||||
.log();
|
.map_err(HError::from)
|
||||||
|
.log();
|
||||||
|
}
|
||||||
|
|
||||||
if file.kind == Kind::Directory {
|
if file.kind == Kind::Directory {
|
||||||
let preview = Previewer::preview_dir(&file,
|
let preview = Previewer::preview_dir(&file,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user