mac linux: make the SparkleShare folder less accessible. closes #1153

This commit is contained in:
Hylke Bons 2013-01-24 20:03:49 +00:00
parent 2aef57c577
commit ee4df60f25
2 changed files with 6 additions and 1 deletions

View file

@ -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);
Syscall.chmod (SparkleConfig.DefaultConfig.FoldersPath, (FilePermissions) 448); // 448 -> 700
SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
folder_created = true;
}

View file

@ -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;
}