Commit 1f87881
committed
Cygwin: is_console_app(): deal with the
This function contains special handling of these file extensions,
treating them as console applications always, even if the first 1024
bytes do not contain a PE header with the console bits set.
However, Batch and Command files are never expected to have such a
header, therefore opening them and reading their first bytes is a waste
of time.
Let's honor the best practice to deal with easy conditions that allow
early returns first.
Fixes: bb42852 (Cygwin: pty: Implement new pseudo console suppot., 2020-08-19)
Signed-off-by: Johannes Schindelin <[email protected]>.bat/.cmd file extensions first1 parent 554422d commit 1f87881
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
707 | 710 | | |
708 | 711 | | |
709 | 712 | | |
| |||
720 | 723 | | |
721 | 724 | | |
722 | 725 | | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
| |||
0 commit comments