changeset 2456:f2d26d984c1e

Bug fix: Remote view:filename command The command: geeqie -r view:filename crashes Geeqie if the filename is not preceeded by a path. Use a string function that handles nulls.
author Colin Clark <cclark@mcb.net>
date Fri, 17 Mar 2017 11:07:16 +0000
parents ecdf0274a079
children 58f993045468
files src/view_file.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/view_file.c	Thu Mar 16 10:45:28 2017 +0000
+++ b/src/view_file.c	Fri Mar 17 11:07:16 2017 +0000
@@ -1083,7 +1083,7 @@
 	if (!refresh)
 		{
 		gchar *base = remove_level_from_path(fd->path);
-		refresh = (strcmp(base, vf->dir_fd->path) == 0);
+		refresh = (g_strcmp0(base, vf->dir_fd->path) == 0);
 		g_free(base);
 		}
 
@@ -1092,14 +1092,14 @@
 		if (!refresh && fd->change->dest)
 			{
 			gchar *dest_base = remove_level_from_path(fd->change->dest);
-			refresh = (strcmp(dest_base, vf->dir_fd->path) == 0);
+			refresh = (g_strcmp0(dest_base, vf->dir_fd->path) == 0);
 			g_free(dest_base);
 			}
 
 		if (!refresh && fd->change->source)
 			{
 			gchar *source_base = remove_level_from_path(fd->change->source);
-			refresh = (strcmp(source_base, vf->dir_fd->path) == 0);
+			refresh = (g_strcmp0(source_base, vf->dir_fd->path) == 0);
 			g_free(source_base);
 			}
 		}