From 5591f1602e6171492f5e4620e67d3addeacad7aa Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 20 Sep 2011 16:08:52 +0200 Subject: VSTi plugin version. --- src/path.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/path.cc') diff --git a/src/path.cc b/src/path.cc index 3812b87..8be2f26 100644 --- a/src/path.cc +++ b/src/path.cc @@ -26,15 +26,27 @@ */ #include "path.h" +#ifndef WIN32 #include +#endif + #include #include std::string getPath(std::string file) { + std::string p; +#ifndef WIN32 char *b = strdup(file.c_str()); - std::string p = dirname(b); + p = dirname(b); free(b); +#else + char drive[_MAX_DRIVE]; + char dir[_MAX_DIR]; + _splitpath(file.c_str(), drive, dir, NULL, NULL); + p = std::string(drive) + dir; +#endif + return p; } -- cgit v1.2.3