]> wimlib.net Git - wimlib/blobdiff - src/pathlist.c
wimextract: allow specifying listfile on stdin
[wimlib] / src / pathlist.c
index 1bb20cff82237b60db3c771ff96cb571d3d6d7c3..11bd8461e8a6b0053af878af5a57b9cda7c0cd42 100644 (file)
@@ -7,20 +7,18 @@
 /*
  * Copyright (C) 2013 Eric Biggers
  *
- * This file is part of wimlib, a library for working with WIM files.
+ * This file is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option) any
+ * later version.
  *
- * wimlib is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 3 of the License, or (at your option)
- * any later version.
- *
- * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * This file is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  * details.
  *
- * You should have received a copy of the GNU General Public License
- * along with wimlib; if not, see http://www.gnu.org/licenses/.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this file; if not, see http://www.gnu.org/licenses/.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -35,7 +33,7 @@ read_path_list_file(const tchar *listfile,
                    tchar ***paths_ret, size_t *num_paths_ret,
                    void **mem_ret)
 {
-       STRING_SET(paths);
+       STRING_LIST(paths);
        struct text_file_section tmp = {
                .name = T(""),
                .strings = &paths,
@@ -43,7 +41,9 @@ read_path_list_file(const tchar *listfile,
        void *buf;
        int ret;
 
-       ret = load_text_file(listfile, &buf, &tmp, 1, NULL);
+       ret = load_text_file(listfile, NULL, 0, &buf, &tmp, 1,
+                            LOAD_TEXT_FILE_REMOVE_QUOTES |
+                            LOAD_TEXT_FILE_ALLOW_STDIN, NULL);
        if (ret)
                return ret;