Try to wrap ffprobe paths in quotes (may fix #168).
authorCarl Hetherington <cth@carlh.net>
Wed, 3 Jul 2013 23:24:21 +0000 (00:24 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 3 Jul 2013 23:24:21 +0000 (00:24 +0100)
src/lib/cross.cc

index 86b6574322076d0ad530a79291fdf215e5221841..124697fb446aca92ad5e89c490a67f7b51a51fd9 100644 (file)
@@ -117,12 +117,14 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out, share
        startup_info.dwFlags |= STARTF_USESTDHANDLES;
 
        wchar_t command[512];
-       wcscpy (command, L"ffprobe.exe ");
+       wcscpy (command, L"ffprobe.exe \"");
 
        wchar_t file[512];
        MultiByteToWideChar (CP_UTF8, 0, content.string().c_str(), -1, file, sizeof(file));
        wcscat (command, file);
 
+       wcscat (command, L"\"");
+
        PROCESS_INFORMATION process_info;
        ZeroMemory (&process_info, sizeof (process_info));
        if (!CreateProcess (0, command, 0, 0, TRUE, CREATE_NO_WINDOW, 0, 0, &startup_info, &process_info)) {