<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hi,<br>
<br>
Typically a leading "." (for the directories "." and "..") would not
be considered the start of an extension. (As was spec'd earlier).
Both "/." and "/.." have an empty extension.<br>
<br>
I would suggest that `removeExtension()` would be more useful if it
removed the final ".", if any.<br>
`addExtension("txt")` would be smart enough to handle both "abc."
and "abc" resulting in "abc.txt".<br>
<br>
$.02, Roger<br>
<br>
<div class="moz-cite-prefix">On 10/11/23 12:55 PM, Brian Burkhalter
wrote:<br>
</div>
<blockquote type="cite" cite="mid:BB3D708F-0B3D-4A39-AB8F-B99E3F27CA6F@oracle.com">
I’ve not gone through 100% of the edge cases, but for this one I
would think both add and remove would not affect “.” or “foo.”.
<div class=""><br class="">
</div>
<div class="">Brian<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Oct 11, 2023, at 9:50 AM, David Lloyd <<a href="mailto:david.lloyd@redhat.com" class="moz-txt-link-freetext" moz-do-not-send="true">david.lloyd@redhat.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px; font-style:
normal; font-variant-caps: normal; font-weight: 400;
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none; float: none; display: inline
!important;" class="">For the edge case where the file
ends in, /or/ comprises, a solitary `.`, would
`removeExtension()` remove the `.` and
`addExtension("")` add it back, or would both methods
leave the path unaffected (either one would satisfy the
invariant)? Or some other behavior?</span></div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br>
</body>
</html>