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. 13
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java

13
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) { public File resolve(final File dir, final String pn) {
String w = readPipe(dir, // String useCygPath = System.getProperty("jgit.usecygpath");
new String[] { cygpath, "--windows", "--absolute", pn }, // if (useCygPath != null && useCygPath.equals("true")) {
"UTF-8"); String w = readPipe(dir, //
if (w != null) new String[] { cygpath, "--windows", "--absolute", pn }, //
return new File(w); "UTF-8");
if (w != null)
return new File(w);
}
return super.resolve(dir, pn); return super.resolve(dir, pn);
} }

Loading…
Cancel
Save