1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

/ is no longer a valid filename in ramfs.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-11-20 22:47:39 +01:00
parent 06c0777193
commit c1849ed7d8

View file

@ -183,7 +183,10 @@ namespace Sortix
DevBuffer* DevRAMFS::OpenFile(const char* path, int flags, mode_t mode)
{
if ( *path++ != '/' ) { return NULL; }
if ( *path++ != '/' ) { Error::Set(Error::ENOENT); return NULL; }
// Hack to prevent / from being a filename.
if ( path++ == 0 ) { Error::Set(Error::ENOENT); return NULL; }
if ( files )
{