Identifier wasnt used if was changed after apply one ACL.

This commit is contained in:
Pedro de Oliveira 2014-04-30 14:24:23 +01:00
parent ac7fbde885
commit 8dd3106af0
2 changed files with 20 additions and 2 deletions

View File

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

View File

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