Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/jenkins
  Commit: f4edf91782720d2e1246ddb48554511912af1491
      
https://github.com/jenkinsci/jenkins/commit/f4edf91782720d2e1246ddb48554511912af1491
  Author: dbroady1 <dbroa...@users.noreply.github.com>
  Date:   2016-08-22 (Mon, 22 Aug 2016)

  Changed paths:
    M core/src/main/java/hudson/Util.java
    A core/src/test/java/hudson/RemoveWindowsDirectoryJunctionTest.java

  Log Message:
  -----------
  [JENKINS-29956] Test Windows junctions before Java 7 symlink (#1787)

* Test Windows junctions before Java 7 symlink

Apparently Java 7 (and later) do not count Windows junctions as
symlinks.  When you drill down into the BasicFileAttributes structure,
reparse points are only counted under isOther.  So, since we already
have code that properly detects Windows Junctions, let's use that first
and then fallback to the Java 7 code.

* Add comment for change & link bug.

* Add test case

* Switch to Functions.isWindows().

* Use non-deprecated APIs for tmp file/dir mgmt

* Add better debugging.

* Allow spaces in junction name & dir name.

To do that, it was easier to use ProcessBuilder vs building up the correct
string in code to send to cmd.exe.

Also, I'll note that according to http://ss64.com/nt/syntax-internal.html,
mklink is in internal cmd.exe command.  So, it must be invoked through
"cmd.exe /c" for it to work.

* Remove comment mentioning bug number.

* Remove debugging output, per Baptiste's request

* Add newline at end of file.

* Make sure that the junction was removed.

* Use assertEquals to show retcode of Process.waitFor.

* Fix compilation errors by importing functions


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to