projects
/
geeqie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fix: Seg fault in copy/move dialog
[geeqie.git]
/
src
/
ui_fileops.c
diff --git
a/src/ui_fileops.c
b/src/ui_fileops.c
index
714efc8
..
c614e96
100644
(file)
--- a/
src/ui_fileops.c
+++ b/
src/ui_fileops.c
@@
-757,8
+757,13
@@
gboolean file_extension_match(const gchar *path, const gchar *ext)
gchar *remove_extension_from_path(const gchar *path)
{
gchar *remove_extension_from_path(const gchar *path)
{
+ const gchar *reg_ext;
+
if (!path) return NULL;
if (!path) return NULL;
- return g_strndup(path, strlen(path)-strlen(registered_extension_from_path(path)));
+
+ reg_ext = registered_extension_from_path(path);
+
+ return g_strndup(path, strlen(path) - (reg_ext == NULL ? 0 : strlen(reg_ext)));
}
void parse_out_relatives(gchar *path)
}
void parse_out_relatives(gchar *path)