bareos: dev eea46a87

Author Committer Branch Timestamp Parent
pstorz pstorz dev 2018-06-21 19:18 bareos-17.2 244cb671 Pending
Affected Issues  0000967: Symbolic links are not replaceable during restore on Win FD
Changeset windows: call DeleteFileW and RemoveDirectoryW to be able to remove symlinks before restore

Windows symlinks could not be replaced during restore because
win32_unlink() only used _wunlink() to remove existing files before
recovery. _wunlink() cannot remove symlinks so that the
overwrite of existing symlinks did not work.

We first try with _unlink(); on failure DeleteFileW()
and as last option we do RemoveDirectoryW()

win32_unlink now is able to remove:
 * direcories
 * files
 * file symlinks and
 * directory symlinks

Fixes 0000967: Symbolic links are not replaceable during restore on Win FD
mod - src/win32/compat/compat.c Diff File