summaryrefslogtreecommitdiff
path: root/zen/file_access.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-10-28 23:21:40 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-10-28 23:21:40 +0000
commit8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7 (patch)
tree65292208a81994782e1c16dd84dfcdcc221d0cd7 /zen/file_access.cpp
parentMerge branch '10.16' into 'master' (diff)
parentadd upstream 10.17 (diff)
downloadFreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.gz
FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.bz2
FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.zip
Merge branch '10.17' into 'master'10.17
10.17 See merge request opensource-tracking/FreeFileSync!14
Diffstat (limited to 'zen/file_access.cpp')
-rw-r--r--zen/file_access.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/file_access.cpp b/zen/file_access.cpp
index 483d4b01..e23d48be 100644
--- a/zen/file_access.cpp
+++ b/zen/file_access.cpp
@@ -138,7 +138,7 @@ std::optional<ItemType> zen::itemStillExists(const Zstring& itemPath) //throw Fi
}
catch (const ItemType&) //finding the item after getItemType() previously failed is exceptional
{
- throw e; //yes, slicing
+ throw FileError(_("Temporary access error:") + L' ' + e.toString());
}
return {};
}
@@ -577,7 +577,7 @@ void zen::copySymlink(const Zstring& sourcePath, const Zstring& targetPath, bool
if (::symlink(linkPath.c_str(), targetPath.c_str()) != 0)
THROW_LAST_FILE_ERROR(replaceCpy(replaceCpy(_("Cannot copy symbolic link %x to %y."), L"%x", L"\n" + fmtPath(sourcePath)), L"%y", L"\n" + fmtPath(targetPath)), L"symlink");
- //allow only consistent objects to be created -> don't place before ::symlink, targetPath may already exist!
+ //allow only consistent objects to be created -> don't place before ::symlink(); targetPath may already exist!
ZEN_ON_SCOPE_FAIL(try { removeSymlinkPlain(targetPath); /*throw FileError*/ }
catch (FileError&) {});
bgstack15