mac linux: make the SparkleShare folder less accessible. closes #1153
This commit is contained in:
parent
459e492dce
commit
e87a3de061
|
@ -19,6 +19,7 @@ using System;
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
using Mono.Unix.Native;
|
||||
using SparkleLib;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
@ -124,8 +125,9 @@ namespace SparkleShare {
|
|||
|
||||
if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
|
||||
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
|
||||
SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
||||
Syscall.chmod (SparkleConfig.DefaultConfig.FoldersPath, (FilePermissions) 448); // 448 -> 700
|
||||
|
||||
SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
||||
folder_created = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ using System.Threading;
|
|||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
|
||||
using Mono.Unix.Native;
|
||||
using SparkleLib;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
@ -121,6 +122,8 @@ namespace SparkleShare {
|
|||
NSWorkspace.SharedWorkspace.SetIconforFile (NSImage.ImageNamed ("sparkleshare-folder.icns"),
|
||||
Program.Controller.FoldersPath, 0);
|
||||
|
||||
Syscall.chmod (Program.Controller.FoldersPath, (FilePermissions) 448); // 448 -> 700
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue