From 0423b423f936750ae7dc8b4904e6a585e5f42cf0 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 28 Mar 2016 11:49:43 +0100 Subject: [PATCH] linux controller: Fix indentation and change custom icon name --- SparkleShare/Linux/SparkleController.cs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/SparkleShare/Linux/SparkleController.cs b/SparkleShare/Linux/SparkleController.cs index ebe620eb..d43e773a 100755 --- a/SparkleShare/Linux/SparkleController.cs +++ b/SparkleShare/Linux/SparkleController.cs @@ -94,27 +94,26 @@ namespace SparkleShare { // Creates the SparkleShare folder in the user's home folder public override bool CreateSparkleShareFolder () { - bool folder_created = false; - + bool folder_created = false; + if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) { - Directory.CreateDirectory (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; - } + SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'"); + folder_created = true; + } string gvfs_command_path = new string [] { Path.VolumeSeparatorChar.ToString (), - "usr", "bin", "gvfs-set-attribute" }.Combine (); - + "usr", "bin", "gvfs-set-attribute" }.Combine (); + // Add a special icon to the SparkleShare folder if (File.Exists (gvfs_command_path)) { - Process process = new Process (); - process.StartInfo.FileName = "gvfs-set-attribute"; + var process = new Process (); - // Give the SparkleShare folder an icon name, so that it scales + process.StartInfo.FileName = "gvfs-set-attribute"; process.StartInfo.Arguments = SparkleConfig.DefaultConfig.FoldersPath + - " metadata::custom-icon-name 'sparkleshare'"; + " metadata::custom-icon-name 'folder-sparkleshare'"; process.Start (); process.WaitForExit ();