* alert when the destination volume is read only. Fixes bug #3422.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29195 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2009-02-14 00:58:01 +00:00
parent cbaec88839
commit 58bda9983c

View File

@ -183,6 +183,7 @@ bool
ExpanderWindow::ValidateDest()
{
BEntry entry(fDestText->Text(), true);
BVolume volume;
if (!entry.Exists()) {
BAlert *alert = new BAlert("destAlert", "The destination"
" directory does not exist.", "Cancel", NULL, NULL,
@ -190,10 +191,14 @@ ExpanderWindow::ValidateDest()
alert->Go();
return false;
} else if (!entry.IsDirectory()) {
BAlert *alert = new BAlert("destAlert", "The destination"
(new BAlert("destAlert", "The destination"
" is not a directory.", "Cancel", NULL, NULL,
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT);
alert->Go();
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT))->Go();
return false;
} else if (entry.GetVolume(&volume) != B_OK || volume.IsReadOnly()) {
(new BAlert("destAlert", "The destination is read only.",
"Cancel", NULL, NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING,
B_WARNING_ALERT))->Go();
return false;
} else {
entry.GetRef(&fDestRef);