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:
@@ -49,7 +49,7 @@ CreateAppMetaMimeThread::DoMimeUpdate(const entry_ref* ref, bool* _entryIsDir)
|
|||||||
BNode typeNode;
|
BNode typeNode;
|
||||||
|
|
||||||
BFile file;
|
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)
|
if (status < B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ CreateAppMetaMimeThread::DoMimeUpdate(const entry_ref* ref, bool* _entryIsDir)
|
|||||||
if (_entryIsDir != NULL)
|
if (_entryIsDir != NULL)
|
||||||
*_entryIsDir = isDir;
|
*_entryIsDir = isDir;
|
||||||
|
|
||||||
if (isDir)
|
if (isDir || !file.IsFile())
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
BAppFileInfo appInfo(&file);
|
BAppFileInfo appInfo(&file);
|
||||||
|
|||||||
Reference in New Issue
Block a user