On Windows, if a tool calls SetCurrentDirectory with a lower case drive
letter, the subsequent call to GetCurrentDirectory will return the same
lower case drive letter. If that happens, test-drop-caches will error out as
it does not correctly to handle lower case drive letters.
Signed-off-by: Ben Peart <ben.pe...@microsoft.com>
---

Notes:
    Base Ref: master
    Web-Diff: https://github.com/benpeart/git/commit/b497c111a7
    Checkout: git fetch https://github.com/benpeart/git drop-caches-v2 && git 
checkout b497c111a7
    
    ### Interdiff (v1..v2):
    
    ### Patches

 t/helper/test-drop-caches.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/helper/test-drop-caches.c b/t/helper/test-drop-caches.c
index d6bcfddf13..37047189c3 100644
--- a/t/helper/test-drop-caches.c
+++ b/t/helper/test-drop-caches.c
@@ -16,7 +16,7 @@ static int cmd_sync(void)
        if ((0 == dwRet) || (dwRet > MAX_PATH))
                return error("Error getting current directory");
 
-       if ((Buffer[0] < 'A') || (Buffer[0] > 'Z'))
+       if ((toupper(Buffer[0]) < 'A') || (toupper(Buffer[0]) > 'Z'))
                return error("Invalid drive letter '%c'", Buffer[0]);
 
        szVolumeAccessPath[4] = Buffer[0];

base-commit: e3331758f12da22f4103eec7efe1b5304a9be5e9
-- 
2.17.0.gvfs.1.123.g449c066

Reply via email to