mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Allow passing - as filename to egg tools to read from stdin
This commit is contained in:
parent
775c69b53d
commit
1bd96685bc
@ -170,11 +170,17 @@ handle_args(ProgramBase::Args &args) {
|
|||||||
Filename filename = Filename::from_os_specific(*ai);
|
Filename filename = Filename::from_os_specific(*ai);
|
||||||
|
|
||||||
EggData file_data;
|
EggData file_data;
|
||||||
if (!file_data.read(filename)) {
|
if (filename != "-") {
|
||||||
// Rather than returning false, we simply exit here, so the ProgramBase
|
if (!file_data.read(filename)) {
|
||||||
// won't try to tell the user how to run the program just because we got
|
// Rather than returning false, we simply exit here, so the ProgramBase
|
||||||
// a bad egg file.
|
// won't try to tell the user how to run the program just because we got
|
||||||
exit(1);
|
// a bad egg file.
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!file_data.read(cin)) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_noabs && file_data.original_had_absolute_pathnames()) {
|
if (_noabs && file_data.original_had_absolute_pathnames()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user