The MinGW.org Installation Manager Tool
Révision | c06df1ad78a7247b9df3713f87d0e26e52ac8b75 (tree) |
---|---|
l'heure | 2013-09-20 17:43:04 |
Auteur | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Force canonical comparison of shell links; (cf. MinGW-Bug #2054)
@@ -1,3 +1,13 @@ | ||
1 | +2013-09-20 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Force canonical comparison of shell links; (cf. MinGW-Bug #2054) | |
4 | + | |
5 | + * scripts/libexec/unlink.js [FileExists(filename) && (chklink != "")]: | |
6 | + The value of 'chklink' may not be canonical; instantiate an (unsaved) | |
7 | + link reference from it, then compare the canonicalized reference from | |
8 | + within it, to the reference within 'filename', thus avoiding possible | |
9 | + lexical mismatch between canonical and non-canonical forms. | |
10 | + | |
1 | 11 | 2013-09-19 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 12 | |
3 | 13 | Correct LUA_PATH assignment for GUI; (cf. MinGW-Bug #2052) |
@@ -40,7 +40,7 @@ | ||
40 | 40 | * This file is a component of mingw-get. |
41 | 41 | * |
42 | 42 | * Written by Keith Marshall <keithmarshall@users.sourceforge.net> |
43 | - * Copyright (C) 2012, MinGW Project | |
43 | + * Copyright (C) 2012, 2013, MinGW.org Project | |
44 | 44 | * |
45 | 45 | * |
46 | 46 | * Permission is hereby granted, free of charge, to any person obtaining a |
@@ -222,11 +222,12 @@ for( i = 0; i < argv.length; i++ ) | ||
222 | 222 | */ |
223 | 223 | if( chklink != "" ) |
224 | 224 | { |
225 | - /* ...but when "--if-linked is in effect, we must verify | |
226 | - * that the link target is matched, before... | |
225 | + /* ...but when "--if-linked is in effect, we must verify that | |
226 | + * the link target is matched (case-insensitively), before... | |
227 | 227 | */ |
228 | 228 | var ref = WinShell.CreateShortcut( filename ); |
229 | - if( ref.TargetPath.toLowerCase() == chklink.toLowerCase() ) | |
229 | + var chk = WinShell.CreateShortcut( filename ); chk.TargetPath = chklink; | |
230 | + if( ref.TargetPath.toLowerCase() == chk.TargetPath.toLowerCase() ) | |
230 | 231 | /* |
231 | 232 | * ...we may proceed with deletion. |
232 | 233 | */ |