Jira (PUP-6585) Remove internal usage of Puppet::Util.absolute_path?(path) / replace with Pathname.new(path)

16 views
Skip to first unread message

Geoff Nichols (JIRA)

unread,
Apr 25, 2017, 11:53:03 AM4/25/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
 
Puppet / Improvement PUP-6585
Remove internal usage of Puppet::Util.absolute_path?(path) / replace with Pathname.new(path)
Change By: Geoff Nichols
Summary: Remove  internal usage of  Puppet::Util.absolute_path?(path) / replace with Pathname.new(path)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Geoff Nichols (JIRA)

unread,
Apr 25, 2017, 11:53:04 AM4/25/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Acceptance Criteria: Puppet uses `Pathname.new(path).absolute_path?` instead of `Puppet::Util.absolute_path?`  everywhere  "internally" .

Geoff Nichols (JIRA)

unread,
May 10, 2017, 1:38:03 PM5/10/17
to puppe...@googlegroups.com

Joe Pinsonault (JIRA)

unread,
May 16, 2017, 5:05:09 PM5/16/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Jun 21, 2017, 4:01:04 PM6/21/17
to puppe...@googlegroups.com

Karen Van der Veer (JIRA)

unread,
Aug 4, 2017, 2:42:04 PM8/4/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
Aug 7, 2017, 7:14:03 PM8/7/17
to puppe...@googlegroups.com

Karen Van der Veer (JIRA)

unread,
Aug 7, 2017, 7:14:04 PM8/7/17
to puppe...@googlegroups.com

Ethan Brown (JIRA)

unread,
Mar 26, 2018, 5:28:02 PM3/26/18
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Team: Platform Core Windows
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Ethan Brown (JIRA)

unread,
Mar 26, 2018, 5:28:03 PM3/26/18
to puppe...@googlegroups.com

Erick Banks (JIRA)

unread,
Feb 7, 2019, 8:22:05 PM2/7/19
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 3, 2021, 9:11:01 PM6/3/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Windows Hopper Platform Core KANBAN
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 3, 2021, 9:11:02 PM6/3/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 3, 2021, 9:11:02 PM6/3/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 3, 2021, 9:11:03 PM6/3/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 3, 2021, 9:11:03 PM6/3/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 8, 2021, 12:48:04 AM6/8/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Aug 3, 2021, 6:14:03 PM8/3/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Platform Core KANBAN , Coremunity Kanban

Josh Cooper (Jira)

unread,
Oct 1, 2021, 3:07:03 PM10/1/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 12, 2021, 1:12:03 PM10/12/21
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-6585
 
Re: Remove internal usage of Puppet::Util.absolute_path?(path) / replace with Pathname.new(path)

It turns out our absolute_path? method behaves differently than Pathname#absolute? when handling so called drive relative Windows paths like C:dir:

irb(main):002:0> Puppet::Util.absolute_path?('C:dir')
=> false
irb(main):003:0> Pathname.new('C:dir').absolute?
=> true
...
irb(main):006:0> Puppet::Util.absolute_path?('/dir')
=> false
irb(main):007:0> Pathname.new('/dir').absolute?
=> true

I don't really understand the pathname behavior. The MSDN docs say https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#traditional-dos-paths

If all three components (volume/drive letter, directory, optional filename) are present, the path is absolute.

But then it goes on to say:

'\Program Files\Custom Utilities\StringFinder.exe' is an absolute path from the root of the current drive.

Given the subtly, I'm going to close this as won't fix.

Reply all
Reply to author
Forward
0 new messages