mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
Don't automatically mark copied files as writable on Windows (non-Unicode and CE)
This commit is contained in:
@@ -288,12 +288,8 @@ void FileImpl::copyToImpl(const std::string& path) const
|
|||||||
{
|
{
|
||||||
poco_assert (!_path.empty());
|
poco_assert (!_path.empty());
|
||||||
|
|
||||||
if (CopyFileA(_path.c_str(), path.c_str(), FALSE) != 0)
|
if (CopyFileA(_path.c_str(), path.c_str(), FALSE) == 0)
|
||||||
{
|
handleLastErrorImpl(_path);
|
||||||
FileImpl copy(path);
|
|
||||||
copy.setWriteableImpl(true);
|
|
||||||
}
|
|
||||||
else handleLastErrorImpl(_path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -285,12 +285,8 @@ void FileImpl::copyToImpl(const std::string& path) const
|
|||||||
|
|
||||||
std::wstring upath;
|
std::wstring upath;
|
||||||
UnicodeConverter::toUTF16(path, upath);
|
UnicodeConverter::toUTF16(path, upath);
|
||||||
if (CopyFileW(_upath.c_str(), upath.c_str(), FALSE) != 0)
|
if (CopyFileW(_upath.c_str(), upath.c_str(), FALSE) == 0)
|
||||||
{
|
handleLastErrorImpl(_path);
|
||||||
FileImpl copy(path);
|
|
||||||
copy.setWriteableImpl(true);
|
|
||||||
}
|
|
||||||
else handleLastErrorImpl(_path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user