| 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. |