Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rhabacker:branches:windows:mingw:win32
mingw32-lucene++
boost_interprocess_file_lock_use_wchar.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File boost_interprocess_file_lock_use_wchar.patch of Package mingw32-lucene++
diff --git a/src/core/store/NativeFSLockFactory.cpp b/src/core/store/NativeFSLockFactory.cpp index 3a3adba..49ebf2b 100644 --- a/src/core/store/NativeFSLockFactory.cpp +++ b/src/core/store/NativeFSLockFactory.cpp @@ -112,19 +112,8 @@ bool NativeFSLock::obtain() { boost::filesystem::ofstream f(path, std::ios::binary | std::ios::out); if (f.is_open()) { - std::string lockpath; - - // file_lock only accepts char* filenames and we cannot losslessly convert Unicode paths to - // char*. The usual way to work around this is to use 8.3 short names. -#if defined(_WIN32) || defined(_WIN64) - wchar_t pathOut[MAX_PATH+1]; - if (::GetShortPathNameW(path.c_str(), pathOut, MAX_PATH+1) != 0) { - lockpath = boost::filesystem::path(pathOut).string(); - } else -#endif // Windows - { - lockpath = boost::filesystem::path(path).string(); - } + boost::filesystem::path lockpath(path); + lock = newInstance<boost::interprocess::file_lock>(lockpath.c_str()); lock->lock(); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor