equal
deleted
inserted
replaced
29 import java.nio.file.attribute.*; |
29 import java.nio.file.attribute.*; |
30 import java.nio.file.spi.*; |
30 import java.nio.file.spi.*; |
31 import java.io.IOException; |
31 import java.io.IOException; |
32 import java.util.*; |
32 import java.util.*; |
33 import java.util.regex.Pattern; |
33 import java.util.regex.Pattern; |
34 import java.security.AccessController; |
|
35 import sun.security.action.GetPropertyAction; |
34 import sun.security.action.GetPropertyAction; |
36 |
35 |
37 /** |
36 /** |
38 * Base implementation of FileSystem for Unix-like implementations. |
37 * Base implementation of FileSystem for Unix-like implementations. |
39 */ |
38 */ |
55 } |
54 } |
56 |
55 |
57 // if process-wide chdir is allowed or default directory is not the |
56 // if process-wide chdir is allowed or default directory is not the |
58 // process working directory then paths must be resolved against the |
57 // process working directory then paths must be resolved against the |
59 // default directory. |
58 // default directory. |
60 String propValue = AccessController.doPrivileged( |
59 String propValue = GetPropertyAction |
61 new GetPropertyAction("sun.nio.fs.chdirAllowed", "false")); |
60 .getProperty("sun.nio.fs.chdirAllowed", "false"); |
62 boolean chdirAllowed = (propValue.length() == 0) ? |
61 boolean chdirAllowed = (propValue.length() == 0) ? |
63 true : Boolean.valueOf(propValue); |
62 true : Boolean.valueOf(propValue); |
64 if (chdirAllowed) { |
63 if (chdirAllowed) { |
65 this.needToResolveAgainstDefaultDirectory = true; |
64 this.needToResolveAgainstDefaultDirectory = true; |
66 } else { |
65 } else { |