]> wimlib.net Git - wimlib/blobdiff - src/capture_common.c
Remove quotes in do_load_text_file()
[wimlib] / src / capture_common.c
index 62ab15b11eef476b6cbf31c6c776d369c61f4e1a..35aaee69a789724584b6d5f1cc8e55eca4e3e1bf 100644 (file)
@@ -72,16 +72,6 @@ do_capture_progress(struct add_image_params *params, int status,
 static int
 mangle_pat(tchar *pat, const tchar *path, unsigned long line_no)
 {
-       /* Remove quotes  */
-       if (pat[0] == T('"') || pat[0] == T('\'')) {
-               tchar quote = pat[0];
-               tchar *last = pat + tstrlen(pat) - 1;
-               if (last > pat && *last == quote) {
-                       tmemmove(pat, pat + 1, last - (pat + 1));
-                       *(last - 1) = T('\0');
-               }
-       }
-
        if (!is_any_path_separator(pat[0]) &&
            pat[0] != T('\0') && pat[1] == T(':'))
        {
@@ -127,7 +117,8 @@ do_read_capture_config_file(const tchar *config_file, tchar *buf, size_t buflen,
        };
 
        ret = do_load_text_file(config_file, buf, buflen, &buf,
-                               sections, ARRAY_LEN(sections), mangle_pat);
+                               sections, ARRAY_LEN(sections),
+                               LOAD_TEXT_FILE_REMOVE_QUOTES, mangle_pat);
        if (ret)
                return ret;