aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fbuilder/build_fs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fbuilder/build_fs.c b/src/fbuilder/build_fs.c
index ce01648e1..88b5eaad3 100644
--- a/src/fbuilder/build_fs.c
+++ b/src/fbuilder/build_fs.c
@@ -134,18 +134,18 @@ static void etc_callback(char *ptr) {
134 134
135 // extract the directory: 135 // extract the directory:
136 assert(strncmp(ptr, "/etc", 4) == 0); 136 assert(strncmp(ptr, "/etc", 4) == 0);
137 char *p1 = ptr + 4; 137 ptr += 4;
138 if (*p1 != '/') 138 if (*ptr != '/')
139 return; 139 return;
140 p1++; 140 ptr++;
141 141
142 if (*p1 == '/') // double '/' 142 if (*ptr == '/') // double '/'
143 p1++; 143 ptr++;
144 if (*p1 == '\0') 144 if (*ptr == '\0')
145 return; 145 return;
146 146
147 // add only top files and directories 147 // add only top files and directories
148 char *end = strchr(p1, '/'); 148 char *end = strchr(ptr, '/');
149 if (end) 149 if (end)
150 *end = '\0'; 150 *end = '\0';
151 etc_out = filedb_add(etc_out, ptr); 151 etc_out = filedb_add(etc_out, ptr);