aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rename_device.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rename_device.c b/src/rename_device.c
index 8e28154d..bb5e6b8f 100644
--- a/src/rename_device.c
+++ b/src/rename_device.c
@@ -120,6 +120,14 @@ int isCfg(const struct dirent *dent) {
}
static inline char *dequote(char *start, char *end) {
+ char *c;
+ //remove comments and trailing whitespace
+ c = strchr(start, '#');
+ if (c!=NULL)
+ *c='\0';
+
+ g_strchomp(start);
+
if (end==NULL) {
end=start;
while(*end) end++;