Page 1 of 1

Finding a writeable folder (FileSystemLayerImpl)

Posted: Mon Apr 20, 2015 8:18 pm
by AshMcConnell
Hi Folks,

I've started an alpha of my game ( http://onlineracingchampionship.com ) and I'm getting some error reports of it crashing because it can't write log and configuration files on Windows 7. If the user runs as admin it successfully writes into the c:\program files (x86)\ORC folder (rather than the Documents\OnlineRacingChampionship folder on Windows 8.1 (and some Windows 7 installs).

I am using Ogre's FileSystemLayerImpl that is used in the Samples, like so: -

Code: Select all

FileSystemLayerImpl *fs = new FileSystemLayerImpl("OnlineRacingChampionship");
return fs->getWritablePath(inPath);
Has anyone else had this problem? Any ideas what could be causing it?

Thanks for your help
All the best,
Ash

Re: Finding a writeable folder (FileSystemLayerImpl)

Posted: Tue Apr 21, 2015 1:35 am
by Kojack
I can't find FileSystemLayerImpl, only FileSystemLayer, which should use SHGetFolderPathW with CSIDL_PERSONAL to get a valid writable directory. Is the Impl version from a different platform?

Re: Finding a writeable folder (FileSystemLayerImpl)

Posted: Wed Apr 22, 2015 9:25 pm
by AshMcConnell
Kojack wrote:I can't find FileSystemLayerImpl, only FileSystemLayer, which should use SHGetFolderPathW with CSIDL_PERSONAL to get a valid writable directory. Is the Impl version from a different platform?
I seem to have taken that file from a previous version of Ogre. Not sure why I did that to be honest ;), perhaps to reduce dependencies to my Utils library. So in summary, I'm an idiot - I'll go look at the latest version and hopefully that will work :)