diff options
author | portix <portix@gmx.net> | 2013-05-14 16:42:49 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2013-05-14 16:42:49 +0200 |
commit | b0efd96352f031eef5c031cb601fb8594f7d3e7e (patch) | |
tree | 8bf24601791551f388b6cc6b7428a0f161395a76 | |
parent | 3181021b8f0a069a3b18731ae0557ccc8d916741 (diff) | |
download | dwb-b0efd96352f031eef5c031cb601fb8594f7d3e7e.zip |
Replace hash-signs in download paths
-rw-r--r-- | src/util.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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; |