зеркало из https://github.com/mozilla/pjs.git
Using SecurityUtilities to query system properties
This commit is contained in:
Родитель
3a93c8cea4
Коммит
279a016d7a
|
@ -297,7 +297,7 @@ public class Dim {
|
|||
// Can be a file name
|
||||
try {
|
||||
if (sourceUrl.startsWith("~/")) {
|
||||
String home = System.getProperty("user.home");
|
||||
String home = SecurityUtilities.getSystemProperty("user.home");
|
||||
if (home != null) {
|
||||
String pathFromHome = sourceUrl.substring(2);
|
||||
File f = new File(new File(home), pathFromHome);
|
||||
|
|
|
@ -52,6 +52,7 @@ import javax.swing.tree.TreePath;
|
|||
import java.lang.reflect.Method;
|
||||
|
||||
import org.mozilla.javascript.Kit;
|
||||
import org.mozilla.javascript.SecurityUtilities;
|
||||
|
||||
import org.mozilla.javascript.tools.shell.ConsoleTextArea;
|
||||
|
||||
|
@ -583,7 +584,7 @@ public class SwingGui extends JFrame implements GuiCallback {
|
|||
private String chooseFile(String title) {
|
||||
dlg.setDialogTitle(title);
|
||||
File CWD = null;
|
||||
String dir = System.getProperty("user.dir");
|
||||
String dir = SecurityUtilities.getSystemProperty("user.dir");
|
||||
if (dir != null) {
|
||||
CWD = new File(dir);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче