From 7fdbda0ffa12159ac7c5f265287540fc5bae71a9 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 12 Sep 2009 07:48:09 +0000 Subject: added getcwd portability patch (Pino Toskano) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1200 90c681e8-e032-0410-971d-27865f9a5e38 --- src/ui/qmmpstarter.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/ui/qmmpstarter.cpp') diff --git a/src/ui/qmmpstarter.cpp b/src/ui/qmmpstarter.cpp index 462329bb5..d0c126ba4 100644 --- a/src/ui/qmmpstarter.cpp +++ b/src/ui/qmmpstarter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -19,8 +19,7 @@ ***************************************************************************/ #include -#include -#include +#include #include #include @@ -115,8 +114,7 @@ void QMMPStarter::writeCommand() #ifndef Q_OS_WIN32 if (!argString.isEmpty()) { - char buf[PATH_MAX + 1]; - QString workingDir = QString::fromLocal8Bit(getcwd(buf,PATH_MAX)) + "\n"; + QString workingDir = QDir::currentPath() + "\n"; QByteArray barray; barray.append(workingDir.toUtf8 ()); -- cgit v1.2.3-13-gbd6f