mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
35 lines
1,012 B
Diff
35 lines
1,012 B
Diff
|
--- a/commandline.cpp
|
||
|
+++ b/commandline.cpp
|
||
|
@@ -537,21 +537,18 @@ bool CommandLine::Parse(int argc, char *argv[])
|
||
|
else
|
||
|
{
|
||
|
list<string> *filenames;
|
||
|
+ filenames = new list<string>;
|
||
|
|
||
|
- // If the argument includes wildcard characters,
|
||
|
- // search the disk for matching files
|
||
|
- if (strchr(argv[0], '*') || strchr(argv[0], '?'))
|
||
|
+ if (argv[0][0] == '-')
|
||
|
{
|
||
|
- string path;
|
||
|
- string name;
|
||
|
- DiskFile::SplitFilename(argv[0], path, name);
|
||
|
-
|
||
|
- filenames = DiskFile::FindFiles(path, name);
|
||
|
- }
|
||
|
- else
|
||
|
- {
|
||
|
- filenames = new list<string>;
|
||
|
- filenames->push_back(argv[0]);
|
||
|
+ while(true)
|
||
|
+ {
|
||
|
+ string filename;
|
||
|
+ if (std::getline(cin, filename))
|
||
|
+ filenames->push_back(filename);
|
||
|
+ else
|
||
|
+ break;
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
list<string>::iterator fn = filenames->begin();
|