Browse Source

Do not resolve path using cygwin unless told to

The system property jgit.cygpath must be set to true in order
for cygwin's cygpath to be used to translate path from cygwin
namespace to Windows namespace.

The cygwin path translation should be considered deprecated.

Bug: 353389
Change-Id: I2b5234c0ab936dac67d1e232f4cd28331bf3226d
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
stable-1.2
Robin Rosenberg 13 years ago committed by SystemConfig
parent
commit
3ceb4fac23
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java

3
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java

@ -81,11 +81,14 @@ class FS_Win32_Cygwin extends FS_Win32 {
}
public File resolve(final File dir, final String pn) {
String useCygPath = System.getProperty("jgit.usecygpath");
if (useCygPath != null && useCygPath.equals("true")) {
String w = readPipe(dir, //
new String[] { cygpath, "--windows", "--absolute", pn }, //
"UTF-8");
if (w != null)
return new File(w);
}
return super.resolve(dir, pn);
}

Loading…
Cancel
Save