Skip to content

Commit d707b6f

Browse files
committed
fix: assure valid path components are never plain . or ...
1 parent 683008a commit d707b6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gix-validate/tests/path/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ mod component {
253253
mktest!(con_with_extension, b"CON.abc", Error::WindowsReservedName);
254254
mktest!(con_with_middle, b"CON.tar.xz", Error::WindowsReservedName);
255255
mktest!(con_mixed_with_middle, b"coN.tar.xz ", Error::WindowsReservedName);
256+
mktest!(dot_dot, b"..", Error::WindowsIllegalCharacter);
257+
mktest!(dot_dot_no_opts, b"..", Error::WindowsIllegalCharacter, NO_OPTS);
258+
mktest!(single_dot, b".", Error::WindowsIllegalCharacter);
259+
mktest!(single_dot_no_opts, b".", Error::WindowsIllegalCharacter, NO_OPTS);
256260
mktest!(
257261
conout_mixed_with_extension,
258262
b"ConOut$ .xyz",

0 commit comments

Comments
 (0)