linux controller: Fix indentation and change custom icon name

This commit is contained in:
Hylke Bons 2016-03-28 11:49:43 +01:00
parent 73d483af93
commit 0423b423f9

View file

@ -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 ();