summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-08-12 15:49:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-08-12 15:49:30 (GMT)
commite554e315b762d564b4e370fa77a26ef6a4a67ccc (patch)
tree798a9cfdca9eba3d0529ab09edcaebe75f79f5a7 /src/analysis
parent7ced9ccef7fae0b392858b1b7f44978e1e6df1cf (diff)
Fixed a bug occurring when content filenames do not contain directory separators.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/contents/file.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/analysis/contents/file.c b/src/analysis/contents/file.c
index 9f37646..b6cd39c 100644
--- a/src/analysis/contents/file.c
+++ b/src/analysis/contents/file.c
@@ -384,8 +384,18 @@ static const char *g_file_content_describe(const GFileContent *content, bool ful
if (full)
result = content->filename;
+
else
- result = strrchr(content->filename, G_DIR_SEPARATOR) + 1;
+ {
+ result = strrchr(content->filename, G_DIR_SEPARATOR);
+
+ if (result == NULL)
+ result = content->filename;
+
+ else
+ result++;
+
+ }
return result;