From: Mike S. <oop...@gm...> - 2009-03-27 00:50:54
|
2009/3/23 Matthew Gates <mat...@gm...>: > On Monday 23 March 2009, Bogdan Marinov wrote: >> On Mon, Mar 23, 2009 at 3:05 AM, Mike Storm <oop...@gm...> wrote: >> > Bogdan, >> > >> >> I'm not sure if this is a bug, or I have missed something in the >> >> documentation, but StelFileMgr::listContents() behaves differently >> >> under Windows and Linux. On Windows, it doesn't return anything if >> >> called with an absolute path like "C:/Documents and >> >> Settings/Admin/Application Data/Stellarium/servers", but the same code >> >> works OK on Linux. It turned out that in order to work correctly, >> >> listContents() has to be called with a relative path (e.g. only >> >> "servers"). >> > >> > This is correct behavior. Everything is accessed >> > platform-independently with relative paths. How could you be certain >> > that the user installed Stellarium to his C:\ drive? You can find out >> > which paths are searched by calling StelFileMgr::getSearchPaths(). >> >> Actually, I was using findFile("servers") to check if this directory >> exists, and the absolute path findFile() returns as a parameter in >> listContents(). As I said, it worked OK on Linux, so if it's not the >> intended behaviour, it should be fixed. :) I committed a fix in revision 4438. Does that solve the problem? Mike |