PDA

View Full Version : Qt4 + C++ + MacOs + Path



zeeb100
5th February 2009, 18:21
Hi guy ... i have a questions:

why when i use qt and write this istruction of system call

lstat("./name_Dir",&buf) or lstat("./Name_file", &buf) or mkdir("./name_dir")

don't work ...

whereas if i use


lstat("/User/nameuser/desktop/name_dir",&buf) or mkdir("/User/nameuser/desktop/name_dir")

work... !!!???!!!???

I don't need the absolute path, and as if it didn't read "./" or "../" please help me

jacek
5th February 2009, 23:10
"./" means current directory and it seems that the current directory differs from what you expect it to be. See QCoreApplication::applicationDirPath().

zeeb100
6th February 2009, 09:23
thanks for help :)