Re: #15012: Strip the trailing colon from volume name and leading period from extension in wxFileName::Assign()

9 views
Skip to first unread message

wxTrac

unread,
Sep 14, 2021, 9:10:57 PM9/14/21
to wx-...@googlegroups.com
#15012: Strip the trailing colon from volume name and leading period from extension
in wxFileName::Assign()
----------------------+-------------------------------------
Reporter: troelsk | Owner:
Type: defect | Status: closed
Priority: low | Milestone:
Component: base | Version: stable-latest
Resolution: invalid | Keywords: wxFileName tests-needed
Blocked By: | Blocking:
Patch: 1 |
----------------------+-------------------------------------
Changes (by vadz):

* status: confirmed => closed
* resolution: => invalid


Comment:

To answer comment:7: the first failure is a problem with the test, "foo/."
is parsed as a file with the path of "foo" and name "." and this is not
simplified. The second test does pass now, I've added it to the test
suite.

As for the original bug report, it seems to be due to a misunderstanding:
of course `m_relative` is set to `false` when assigning `dir` as the path,
it doesn't start with a slash (or backslash), so it is relative. To make
an absolute path, it should be `/dir`. Otherwise there would be no way to
create a relative path using `Assign()`. So I don't think there is
anything to do here.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/15012#comment:8>

wxTrac

unread,
Sep 22, 2021, 10:48:01 AM9/22/21
to wx-...@googlegroups.com
#15012: Strip the trailing colon from volume name and leading period from extension
in wxFileName::Assign()
----------------------+-------------------------------------
Reporter: troelsk | Owner:
Type: defect | Status: closed
Priority: low | Milestone:
Component: base | Version: stable-latest
Resolution: invalid | Keywords: wxFileName tests-needed
Blocked By: | Blocking:
Patch: 1 |
----------------------+-------------------------------------

Comment (by Vadim Zeitlin <vadim@…>):

In [changeset:"e8629db48ab86c4c0cd76cd0323f2fa638626041/git-wxWidgets"
e8629db4/git-wxWidgets]:
{{{
#!CommitTicketReference repository="git-wxWidgets"
revision="e8629db48ab86c4c0cd76cd0323f2fa638626041"
Add another test case for wxPATH_NORM_DOTS

This was reported to not work but does work now.

See #15012.
}}}

--
Ticket URL: <https://trac.wxwidgets.org/ticket/15012#comment:9>
Reply all
Reply to author
Forward
0 new messages