filetypes: fix incorrect usage
Commit 6d9b21e8 contained an error that resulted in FileTypes being unable to set icons for files and directories. This should now be resolved. Change-Id: Ieb65a6d80c7f96f94bca9dff89681777c7de5577 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6183 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
5292bd2993
commit
6f4e837685
@ -1240,10 +1240,12 @@ IconView::_SetIcon(BBitmap* large, BBitmap* mini, const uint8* data,
|
||||
{
|
||||
if (fHasRef) {
|
||||
BNodeInfo node;
|
||||
BDirectory refdir;
|
||||
BFile file;
|
||||
BEntry entry(&fRef, true);
|
||||
|
||||
if (entry.IsFile()) {
|
||||
BFile file(&fRef, B_READ_WRITE);
|
||||
file.SetTo(&fRef, B_READ_WRITE);
|
||||
if (is_application(file)) {
|
||||
BAppFileInfo info(&file);
|
||||
if (info.InitCheck() == B_OK) {
|
||||
@ -1258,7 +1260,7 @@ IconView::_SetIcon(BBitmap* large, BBitmap* mini, const uint8* data,
|
||||
node.SetTo(&file);
|
||||
}
|
||||
if (entry.IsDirectory()) {
|
||||
BDirectory refdir(&fRef);
|
||||
refdir.SetTo(&fRef);
|
||||
node.SetTo(&refdir);
|
||||
}
|
||||
if (node.InitCheck() == B_OK) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user