i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 371c758999e1d273e8a68e858f17ea195943b666
parent 62fac878328bc3c30a216e425c354f77d108c290
Author: Cassandra Fox <cass@fox.mom>
Date:   Thu, 30 May 2019 17:39:05 -0700

Merge branch 'master' into i3lock-color
Diffstat:
Mi3lock.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/i3lock.c b/i3lock.c
@@ -267,10 +267,10 @@ bool bar_reversed = false;
 /*
  * Checks if the given path leads to an actual file or something else, e.g. a directory
  */
-int is_regular_file(const char *path) {
+int is_directory(const char *path) {
     struct stat path_stat;
     stat(path, &path_stat);
-    return S_ISREG(path_stat.st_mode);
+    return !S_ISDIR(path_stat.st_mode);
 }
 
 /*
@@ -2129,8 +2129,8 @@ int main(int argc, char *argv[]) {
 
     init_colors_once();
     if (image_path != NULL) {
-        if (is_regular_file(image_path)) {
-            img = load_image(image_path, image_raw_format);
+        if (!is_directory(image_path)) {
+            img = load_image(image_path);
         } else {
             /* Path to a directory is provided -> use slideshow mode */
             load_slideshow_images(image_path, image_raw_format);