Issues with call for Documents folder

Författare Svar
rogerroger Wednesday 16 December 2020 at 2:37

Hi, greatly appreciate your time and effort helping us.

My app installs with a folder under Documents for the users data. In 4.4.1 the installer creates this folder and I can retrieve the path to it in code but when I call to Change the Directory to this, POM rejects the call throwing me into the programs internal data directory, which is the current directory. This has various unwanted effects and renders the app unusable even though all the other code seems to run correctly under 4.4.1. It is difficult to deal with the inability to use the path to the Documents folder. POM does create another folder called MyDocuments in its virtual drive but it does not provide that path when the (Windows) Documents path is queried. I cannot see why it should reject the standard user's Documents path. It should accept it or redirect it to the virtual drive's MyDocuments folder but if the later, then the installer must do the same.

It would be better to allow the user to use their own Documents folder for data docs since the idea is to provide an experience to the user as if they were running a Mac native app. If there is an insistence of some kind of sand-boxing, then this needs to be done consistently in the installer and the run-time. In that case, it would be very helpful to provide the user a direct access to that folder in the POM interface, like a right-click on the app icon gives a link to the App's documents folder. After all, the user may often need to access this data for emailing etc. and searching in the Finder may be challenging for the typical non-tech user.

Even though I have written several lines, I hope you can see that the actual issue is very simple. The failure of the installer and the run-time to handle the Documents path consistently or correctly.

Any assistance woukld be greately appreciated, thank you for your time.


rogerroger Wednesday 16 December 2020 at 20:29

I have established this is not a permissions issue. I set the datafolder under Users/myname/Documents to 777 and the Windows Open dialog still can't see it or the app access it..

rogerroger Wednesday 16 December 2020 at 20:33

I should have said that I am using Big Sur.  As almost any app will likely use a user data folder under the Documents folder, this issue seems like it should be a very common and critical one. Thanks for helping.

rogerroger Saturday 26 December 2020 at 20:45

Hi folks, here is the situation that I hope you folks will address.

When an app asks to access the Mac user/Documents folder, as very many will, Crossover throws up a UAC and obtains the necessary permission after which the app runs correctly. POM fails to provide the UAC so the app fails to get access.

As I said above, it is not about the underlying Unix permissions, this is Mac OSX maintaining its own sandboxes. This may be a new behaviour in Big Sur.