Linux - Ubuntu Desktop - FolderItem.exists

I have manually created a folder structure /Home/pentad/data/
I have set up a valid FolderItem f to access it
f,Exists() reports false.

I see elsewhere on the forum this was reported in the past, and was tagged as a bug, I am running 2021r1, has it been fixed ? if so what am I doing wrong, If not is there a work-around.
Thanks in advance

Have you checked that the NativePath property of the folderitem is actually what you expect?
I’m not saying there’s not a bug with Exists() under Linux, but it’s easy to overlook a folderitem has been constructed wrong in code.

Thank you Arnaud. Yes, having created the FolderItem from string /Home/pentad/data/. I then display the native path prior to calling exists, the native path is as expected,

Ok. I’ve searched in Feedback and found no report about your issue (I used the search term “exists”). So, unless there’s a private one or I overlooked one, it’d be a good idea to create one.

You’re encountering this bug in the latest version, so it looks unfixed :wink:

I’ll let someone knowing about this bug answering.

P.S.: searching in Feedback can be a nightmare. I searched for “exists”, which, of course, hit a lot of results. Most of them were reports of 2015 or earlier, and a lot from 2012 or before.
Shouldn’t these old reports get archived or otherwise not included in the list? A bug that appeared in 2010 is unlikely to be both still existing and getting fixed.

Try the path: " /Home/pentad/data" or use SpecialFolder.UserHome.Child(“pentad”).Child(“data”)

DerkJ. Thank you for that. the problem is me! Newbe to Ubuntu, I thought the Home menu option in the sidebar pointed to /Home/ so I used specialFolders.Home to find the folders. Using the UserHome path found my files. Thank you both for your time, I appreciate it, it was a show stopper

2 Likes

Unlike windows, Linux is case sensitive and the standard home directory is ‘/home’ not ‘/Home’.
Using SpecialFolder.UserHome is a safer solution.

2 Likes

Thank you john, quite right and still getting to grips with unix case, windows make you lazy!.

I do use the specialFolder key, my mistake was to use .Home when I should use .UserHome. Rookie error

And names are like Linux (case sensitive) :wink:

Thanks Arnaud. I spent the first 10 years of my IT life on Unix, The next 40 years on Windows, now building multi platform so getting aquanted with Unix again ( and Mac!). Slowly coming back. Thank for your help, and the prompt response from all. My app ported from windows working now so can get on with real work.

You’re welcome. Glad to have helped.