Strange result NativePath in OS X

Situation: OS X 10.11.3 and Xojo 2015R4.1

When I fill a path into FolderItem the result is very strange.

[code]Dim ConfigDbFile As FolderItem
Dim strFilepath As String

strFilepath = “/Users/paul/MyApp/”
ConfigDbFile = New FolderItem(strFilePath)
When I look into ConfigDbFile the result is totally different from what I would expect.
NativePath contains following data:


ShellPath is also wrong:




DisplayName and Name are correct:


Is this a bug or am I doing something wrong?

[quote=253525:@Paul Sondervan]
Is this a bug or am I doing something wrong?[/quote]
You’re doing something wrong

try adding the PATHTYPE param to new folderitem like

ConfigDbFile = New FolderItem(strFilePath, FolderItem.PathTypeNative),_PathType_as_Integer%3DPathTypeAbsolute)

Try something like this:

f = New FolderItem(App.ExecutableFile.Parent.Parent.Child("Resources").Child("MyApp.cfg"))

Updt: Norman beat me with another solution :slight_smile:

ConfigDbFile = New FolderItem(strFilePath)
This defaults to
ConfigDbFile = New FolderItem(strFilePath, FolderItem.PathTypeAbsolute)

On OS X pathtypeabsolute for the file in question would be more like

NOTE the : as separators NOT the Unix style /

Hence why you need to specify the PathType in the constructor

I’ve changed it into ConfigDbFile = New FolderItem(strFilePath, FolderItem.PathTypeNative).
Now I get the correct results.
Thanks for pointing me in the right direction Norman.