mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Setting preferences.txt permissions to 600 on linux and mac
This commit is contained in:
@ -21,15 +21,6 @@
|
||||
*/
|
||||
|
||||
package processing.app;
|
||||
import static processing.app.I18n._;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import cc.arduino.packages.BoardPort;
|
||||
import com.sun.jna.Library;
|
||||
@ -39,6 +30,12 @@ import processing.app.debug.TargetPackage;
|
||||
import processing.app.debug.TargetPlatform;
|
||||
import processing.app.legacy.PConstants;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import static processing.app.I18n._;
|
||||
|
||||
|
||||
/**
|
||||
* Used by Base for platform-specific tweaking, for instance finding the
|
||||
@ -227,4 +224,9 @@ public class Platform {
|
||||
public List<BoardPort> filterPorts(List<BoardPort> ports, boolean aBoolean) {
|
||||
return new LinkedList<BoardPort>(ports);
|
||||
}
|
||||
|
||||
public void fixPrefsFilePermissions(File prefsFile) throws IOException, InterruptedException {
|
||||
Process process = Runtime.getRuntime().exec(new String[]{"chmod", "600", prefsFile.getAbsolutePath()}, null, null);
|
||||
process.waitFor();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user