diff --git a/lib/engine.js b/lib/engine.js index 46428a0e..f7529237 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -179,11 +179,11 @@ function engage(targetHistory) { fs.exists(gui.App.dataPath+'\\vlc_playlist.m3u', function(exists) { if (exists) fs.unlink(gui.App.dataPath+'\\vlc_playlist.m3u', function() { fs.writeFile(gui.App.dataPath+'\\vlc_playlist.m3u', newM3U, function() { - require('child_process').exec(require('path').dirname(process.execPath)+'\\plugins\\vlc.exe "'+gui.App.dataPath+'\\vlc_playlist.m3u"'); + require('child_process').exec('"'+require('path').dirname(process.execPath)+'\\plugins\\vlc.exe" "'+gui.App.dataPath+'\\vlc_playlist.m3u"'); }); }); else fs.writeFile(gui.App.dataPath+'\\vlc_playlist.m3u', newM3U, function() { - require('child_process').exec(require('path').dirname(process.execPath)+'\\plugins\\vlc.exe "'+gui.App.dataPath+'\\vlc_playlist.m3u"'); + require('child_process').exec('"'+require('path').dirname(process.execPath)+'\\plugins\\vlc.exe" "'+gui.App.dataPath+'\\vlc_playlist.m3u"'); }); }); }