CreateAppMetaMimeThread::DoMimeUpdate():
* Don't traverse symlinks. Besides that this is not how the BeOS implementation behaves it could also lead to undesired recursion in case of symlinks to directories. * Only process regular files. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36613 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c591958a9a
commit
223bdece87
@ -49,7 +49,7 @@ CreateAppMetaMimeThread::DoMimeUpdate(const entry_ref* ref, bool* _entryIsDir)
|
||||
BNode typeNode;
|
||||
|
||||
BFile file;
|
||||
status_t status = file.SetTo(ref, B_READ_ONLY);
|
||||
status_t status = file.SetTo(ref, B_READ_ONLY | O_NOTRAVERSE);
|
||||
if (status < B_OK)
|
||||
return status;
|
||||
|
||||
@ -57,7 +57,7 @@ CreateAppMetaMimeThread::DoMimeUpdate(const entry_ref* ref, bool* _entryIsDir)
|
||||
if (_entryIsDir != NULL)
|
||||
*_entryIsDir = isDir;
|
||||
|
||||
if (isDir)
|
||||
if (isDir || !file.IsFile())
|
||||
return B_OK;
|
||||
|
||||
BAppFileInfo appInfo(&file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user