summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 696c2e0d..c84319f2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -387,7 +387,16 @@ util_normalize_filename(char *buffer, const char *filename, size_t length)
char *tmp = buffer;
for (size_t i=0; *filename != 0 && i<length-1; i++, filename++, buffer++)
{
- *buffer = *filename == '/' ? '_' : *filename;
+ switch (*filename)
+ {
+ case '/':
+ case '#':
+ *buffer = '_';
+ break;
+ default :
+ *buffer = *filename;
+ break;
+ }
}
*buffer = 0;
return tmp;