diff options
Diffstat (limited to 'src/thirdparty/unrar/win32lnk.cpp')
-rw-r--r-- | src/thirdparty/unrar/win32lnk.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/thirdparty/unrar/win32lnk.cpp b/src/thirdparty/unrar/win32lnk.cpp index b291056f0..71c20b95e 100644 --- a/src/thirdparty/unrar/win32lnk.cpp +++ b/src/thirdparty/unrar/win32lnk.cpp @@ -62,7 +62,11 @@ bool CreateReparsePoint(CommandData *Cmd,const wchar *Name,FileHeader *hd) size_t PrintLength=wcslen(PrintName); bool AbsPath=WinPrefix; - if (!Cmd->AbsoluteLinks && (AbsPath || !IsRelativeSymlinkSafe(hd->FileName,hd->RedirName))) + // IsFullPath is not really needed here, AbsPath check is enough. + // We added it just for extra safety, in case some Windows version would + // allow to create absolute targets with SYMLINK_FLAG_RELATIVE. + if (!Cmd->AbsoluteLinks && (AbsPath || IsFullPath(hd->RedirName) || + !IsRelativeSymlinkSafe(hd->FileName,hd->RedirName))) return false; CreatePath(Name,true); |