diff --git a/ACLAFS/mainForm.cs b/ACLAFS/mainForm.cs index 8a6e52e..dce79bf 100644 --- a/ACLAFS/mainForm.cs +++ b/ACLAFS/mainForm.cs @@ -87,18 +87,36 @@ namespace ACLAFS procurarBtn.Enabled = false; if (identificadorTxt.Text.Length > 0) { procurarBtn.Enabled = true; + a.identifier = identificadorTxt.Text; + + if ((identificadorTxt.Text != "") && (directoriaTxt.Text.EndsWith("\\") == false) && Directory.Exists(directoriaTxt.Text) && IsNetworkPath(directoriaTxt.Text)) + { + a.identifier = identificadorTxt.Text; + a.directory = directoriaTxt.Text; + aclGrp.Enabled = true; + + UpdateCheckboxes(); + } + else + { + aclGrp.Enabled = false; + applyBtn.Enabled = false; + recursiveChkBox.Enabled = false; + } } } private void applyBtn_Click(object sender, EventArgs e) { + a.identifier = identificadorTxt.Text; + a.directory = directoriaTxt.Text; a.ApplyAcl(getAclString(), recursiveChkBox.Checked); UpdateCheckboxes(); } private void directoriaTxt_TextChanged(object sender, EventArgs e) { - if ((identificadorTxt.Text != "") && Directory.Exists(directoriaTxt.Text) && IsNetworkPath(directoriaTxt.Text)) + if ((identificadorTxt.Text != "") && (directoriaTxt.Text.EndsWith("\\") == false) && Directory.Exists(directoriaTxt.Text) && IsNetworkPath(directoriaTxt.Text)) { a.identifier = identificadorTxt.Text; a.directory = directoriaTxt.Text; diff --git a/README.md b/README.md index 3599f9e..1dbe087 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ACLAFS ====== -An C# frontend to fs.exe to apply OpenAFS ACLs recursively. +C# frontend to (recursively) manage OpenAFS ACLs Instructions on http://falsovsky.github.io/ACLAFS