summaryrefslogtreecommitdiffstats
path: root/soundserver/artsplay.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-05 21:11:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-05 21:11:05 +0000
commit6637c742279c9df570b3bd1d09244f1b0f66ee62 (patch)
tree522e3430dc3b085aad27f9eb6f144977b65a1dd3 /soundserver/artsplay.cc
parent7de042bb5beca4107a444f8c60ef24c9735deb65 (diff)
downloadarts-6637c742279c9df570b3bd1d09244f1b0f66ee62.tar.gz
arts-6637c742279c9df570b3bd1d09244f1b0f66ee62.zip
Compilation repairs
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1212131 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'soundserver/artsplay.cc')
-rw-r--r--soundserver/artsplay.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/soundserver/artsplay.cc b/soundserver/artsplay.cc
index b8dec3d..a694cd3 100644
--- a/soundserver/artsplay.cc
+++ b/soundserver/artsplay.cc
@@ -42,13 +42,19 @@ static string absolutePath(const string& path)
{
if(path[0] == '/') return path;
- char buffer[PATH_MAX];
- getcwd(buffer,PATH_MAX);
+ int size = 4096;
- if(buffer[strlen(buffer)-1] == '/')
- return buffer + path;
- else
- return string(buffer) + '/' + path;
+ while (1) {
+ char buffer[size];
+ if (getcwd(buffer,size))
+ {
+ if(buffer[strlen(buffer)-1] == '/')
+ return buffer + path;
+ else
+ return string(buffer) + '/' + path;
+ }
+ size *= 2;
+ }
}
int main(int argc, char **argv)