Skip to content

Commit 15f9be1

Browse files
sookachhsutter
andauthored
Remove forward slash as command line switch (#1175)
* Allow absolute filepath on command line * Using common.h's `contains` until string.contains is widely supported --------- Co-authored-by: Herb Sutter <herb.sutter@gmail.com>
1 parent 755fa6f commit 15f9be1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/cppfront.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ auto main(
6363
{
6464
if (
6565
arg.text.starts_with("-")
66-
|| arg.text.starts_with("/")
66+
|| (arg.text.starts_with("/") && !contains(arg.text, '.'))
6767
)
6868
{
6969
auto ambiguous = cmdline.flags_starting_with(arg.text.substr(1));

0 commit comments

Comments
 (0)