diff --git a/SparkleShare/Linux/SparkleController.cs b/SparkleShare/Linux/SparkleController.cs index 4f3fd0dd..c68f2d2c 100755 --- a/SparkleShare/Linux/SparkleController.cs +++ b/SparkleShare/Linux/SparkleController.cs @@ -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; } diff --git a/SparkleShare/Mac/SparkleController.cs b/SparkleShare/Mac/SparkleController.cs index 2ff9eed6..e342dc04 100755 --- a/SparkleShare/Mac/SparkleController.cs +++ b/SparkleShare/Mac/SparkleController.cs @@ -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; }