Skip to content

Commit

Permalink
修正导入文件错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Jan 15, 2014
1 parent 8616258 commit 9c3ff7c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Development/Editor/Core/Script/Lua/mpq_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,7 @@ end
-- 返回值:true表示成功,false表示失败
function mpq_util.insert_file_form_ydwe(self, map_path, path_in_archive)
log.trace("mpq_util.insert_file_form_ydwe.")
local result = false
local extract_file_path = fs.ydwe_path() / "logs" / path_in_archive
fs.create_directories(extract_file_path:parent_path())
if storm.extract_file(extract_file_path, path_in_archive) then
result = self:insert_file(map_path, extract_file_path, path_in_archive)

-- 删除临时文件
pcall(fs.remove_all, extract_file_path)
else
log.error("Cannot extract " .. path_in_archive)
end
return result
return self:insert_file(map_path, fs.ydwe_path() / "share" / "mpq" / "units" / path_in_archive, path_in_archive)
end

-- 从地图中解压出文件来然后调用回调函数更新
Expand Down

0 comments on commit 9c3ff7c

Please sign in to comment.