jdk/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java
changeset 37593 824750ada3d6
parent 29986 97167d851fc4
child 37781 71ed5645f17c
equal deleted inserted replaced
37592:c80f098887f4 37593:824750ada3d6
    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 {