DiskProbe now also allows you to open directories; even though you can't access their
stream, you can still see and change their attributes (same for symlinks which were already allowed before). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21508 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -298,7 +298,6 @@ void
|
||||
DiskProbe::RefsReceived(BMessage *message)
|
||||
{
|
||||
bool traverseLinks = (modifiers() & B_SHIFT_KEY) == 0;
|
||||
int32 directories = 0;
|
||||
|
||||
int32 index = 0;
|
||||
entry_ref ref;
|
||||
@@ -310,15 +309,6 @@ DiskProbe::RefsReceived(BMessage *message)
|
||||
BEntry entry;
|
||||
status_t status = entry.SetTo(&ref, traverseLinks);
|
||||
|
||||
// If it's a directory, we won't handle it, but we would accept a volume
|
||||
if (status == B_OK && traverseLinks && entry.IsDirectory()) {
|
||||
BDirectory directory(&entry);
|
||||
if (directory.InitCheck() != B_OK || !directory.IsRootDirectory()) {
|
||||
directories++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (status == B_OK)
|
||||
status = Probe(entry, attribute);
|
||||
|
||||
@@ -334,12 +324,6 @@ DiskProbe::RefsReceived(BMessage *message)
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go();
|
||||
}
|
||||
}
|
||||
|
||||
if (directories > 0) {
|
||||
(new BAlert("DiskProbe request",
|
||||
"Sorry, only regular files and volumes can be opened.\n", "Ok", NULL, NULL,
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user