u0u0 / Quick-Cocos2dx-Community

Cocos2d-Lua 社区版
http://www.cocos2d-lua.org
552 stars 256 forks source link

FileUtils的removeDirectory没有为Windows格式化路径 #116

Closed mr-bogey closed 5 years ago

mr-bogey commented 5 years ago

FileUtils的removeDirectory没有为Windows格式化路径,导致cmd执行失败

#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
std::string command = "cmd /c rd /s /q ";
// Path may include space.
command += "\"" + path + "\"";

if (WinExec(command.c_str(), SW_HIDE) > 31)
    return true;
else
    return false;
u0u0 commented 5 years ago

给一个测试案例,便于调试。

mr-bogey commented 5 years ago

给一个测试案例,便于调试。

https://github.com/mr-bogey/base 这个工程的Updater啊

removefile 都转换了啊

u0u0 commented 5 years ago

https://github.com/u0u0/Quick-Cocos2dx-Community/commit/ce3d889979d0aa24a479778e9dca37687d6483c1