* 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:
parent
cbaec88839
commit
58bda9983c
@ -183,6 +183,7 @@ bool
|
|||||||
ExpanderWindow::ValidateDest()
|
ExpanderWindow::ValidateDest()
|
||||||
{
|
{
|
||||||
BEntry entry(fDestText->Text(), true);
|
BEntry entry(fDestText->Text(), true);
|
||||||
|
BVolume volume;
|
||||||
if (!entry.Exists()) {
|
if (!entry.Exists()) {
|
||||||
BAlert *alert = new BAlert("destAlert", "The destination"
|
BAlert *alert = new BAlert("destAlert", "The destination"
|
||||||
" directory does not exist.", "Cancel", NULL, NULL,
|
" directory does not exist.", "Cancel", NULL, NULL,
|
||||||
@ -190,10 +191,14 @@ ExpanderWindow::ValidateDest()
|
|||||||
alert->Go();
|
alert->Go();
|
||||||
return false;
|
return false;
|
||||||
} else if (!entry.IsDirectory()) {
|
} else if (!entry.IsDirectory()) {
|
||||||
BAlert *alert = new BAlert("destAlert", "The destination"
|
(new BAlert("destAlert", "The destination"
|
||||||
" is not a directory.", "Cancel", NULL, NULL,
|
" is not a directory.", "Cancel", NULL, NULL,
|
||||||
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT);
|
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT))->Go();
|
||||||
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;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
entry.GetRef(&fDestRef);
|
entry.GetRef(&fDestRef);
|
||||||
|
Loading…
Reference in New Issue
Block a user