Commit 08176b19 authored by Frank Li's avatar Frank Li

correct fix windows file lock problem

Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
parent c0b128b9
......@@ -97,8 +97,11 @@ shared_ptr<FileBuffer> get_file_buffer(string filename, bool async)
if (p->reload(filename, async))
return NULL;
g_filebuffer_map[filename]=p;
#ifdef WIN32
/*Don't buffer file map file because it will be locked in windows to prevent user update it*/
if (!p->m_pMapbuffer)
g_filebuffer_map[filename] = p;
#endif
return p;
}
else
......@@ -117,11 +120,7 @@ shared_ptr<FileBuffer> get_file_buffer(string filename, bool async)
if(p->m_aync_thread.joinable())
p->m_aync_thread.join();
}
#ifdef WIN32
/*Don't buffer file map file because it will be locked in windows to prevent user update it*/
if (p->m_pMapbuffer)
g_filebuffer_map.erase(filename);
#endif
return p;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment