summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Nordholts <enselic@gmail.com>2020-12-28 22:48:52 +0100
committerMartin Nordholts <enselic@gmail.com>2020-12-28 22:48:52 +0100
commit552545fe5f807f7fca51ab5a52cebcd15dd0021a (patch)
treee9d90762f49191a84d1e880b207309268ac9f6bd /src
parentdcfe883f4be477dfe2ef3cef254d9446048a3bfe (diff)
parentf45fa5e18718140a0892e4e662c8715e1f1a073c (diff)
Merge remote-tracking branch 'origin/master' into fix-1063
Diffstat (limited to 'src')
-rw-r--r--src/assets.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/assets.rs b/src/assets.rs
index 5e0c0644..55b4941e 100644
--- a/src/assets.rs
+++ b/src/assets.rs
@@ -38,9 +38,16 @@ impl HighlightingAssets {
};
let theme_dir = source_dir.join("themes");
-
- let res = theme_set.add_from_folder(&theme_dir);
- if res.is_err() {
+ if theme_dir.exists() {
+ let res = theme_set.add_from_folder(&theme_dir);
+ if let Err(err) = res {
+ println!(
+ "Failed to load one or more themes from '{}' (reason: '{}')",
+ theme_dir.to_string_lossy(),
+ err,
+ );
+ }
+ } else {
println!(
"No themes were found in '{}', using the default set",
theme_dir.to_string_lossy()