From 3a058dc4b3f7a8d3f131f2031bf348788ce9206c Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 27 Jan 2024 11:18:03 +0100 Subject: Revert "StorePath: reject names starting with '.'" This reverts commit 24bda0c7b381e1a017023c6f7cb9661fae8560bd. (cherry picked from commit 9ddd0f2af8fd95e1380027a70d0aa650ea2fd5e4) Change-Id: Ideb547e2a8ac911cf39d58d3e0c1553867bdd776 --- tests/unit/libstore-support/tests/path.cc | 9 ++------- tests/unit/libstore/path.cc | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/unit/libstore-support/tests/path.cc b/tests/unit/libstore-support/tests/path.cc index ffc4fc607..bf45ffd91 100644 --- a/tests/unit/libstore-support/tests/path.cc +++ b/tests/unit/libstore-support/tests/path.cc @@ -47,13 +47,8 @@ Gen Arbitrary::arbitrary() pre += '-'; break; case 64: - // names aren't permitted to start with a period, - // so just fall through to the next case here - if (c != 0) { - pre += '.'; - break; - } - [[fallthrough]]; + pre += '.'; + break; case 65: pre += '_'; break; diff --git a/tests/unit/libstore/path.cc b/tests/unit/libstore/path.cc index 30631b5fd..5485ab8bb 100644 --- a/tests/unit/libstore/path.cc +++ b/tests/unit/libstore/path.cc @@ -39,7 +39,6 @@ TEST_DONT_PARSE(double_star, "**") TEST_DONT_PARSE(star_first, "*,foo") TEST_DONT_PARSE(star_second, "foo,*") TEST_DONT_PARSE(bang, "foo!o") -TEST_DONT_PARSE(dotfile, ".gitignore") #undef TEST_DONT_PARSE -- cgit v1.2.3