aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--find_java/find_java_exe.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/find_java/find_java_exe.cpp b/find_java/find_java_exe.cpp
index c8e0e49..6b1add9 100644
--- a/find_java/find_java_exe.cpp
+++ b/find_java/find_java_exe.cpp
@@ -117,12 +117,15 @@ int main(int argc, char* argv[]) {
_ASSERT(!javaPath.isEmpty());
if (doShortPath) {
+ PVOID oldWow64Value = disableWow64FsRedirection();
if (!javaPath.toShortPath(&javaPath)) {
+ revertWow64FsRedirection(&oldWow64Value);
fprintf(stderr,
"Failed to convert path to a short DOS path: %s\n",
javaPath.cstr());
return 1;
}
+ revertWow64FsRedirection(&oldWow64Value);
}
if (doVersion) {