Fixing PathWatcher root path handling on Windows

This commit is contained in:
joakim 2015-05-01 14:49:45 -07:00
parent 3a0a85ebc9
commit b87db668c7
2 changed files with 9 additions and 4 deletions

View File

@ -376,11 +376,16 @@ public class PathWatcher extends AbstractLifeCycle implements Runnable
boolean needDelim = false;
// Add root (aka "C:\" for Windows)
if (path.getRoot() != null)
Path root = path.getRoot();
if (root != null)
{
for (char c : path.getRoot().toString().toCharArray())
if (NOISY_LOG.isDebugEnabled())
{
if (c != '\\')
NOISY_LOG.debug("Path: {} -> Root: {}",path,root);
}
for (char c : root.toString().toCharArray())
{
if (c == '\\')
{
s.append(PATTERN_SEP);
}

View File

@ -2,4 +2,4 @@
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
#org.eclipse.jetty.util.LEVEL=DEBUG
org.eclipse.jetty.util.PathWatcher.Noisy.LEVEL=OFF
#org.eclipse.jetty.util.PathWatcher.Noisy.LEVEL=OFF