mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
/ is no longer a valid filename under ramfs.
This commit is contained in:
parent
2c3fb60d52
commit
8678ad6444
1 changed files with 7 additions and 3 deletions
|
@ -239,10 +239,14 @@ namespace Sortix
|
||||||
|
|
||||||
Device* DevRAMFS::Open(const char* path, int flags, mode_t mode)
|
Device* DevRAMFS::Open(const char* path, int flags, mode_t mode)
|
||||||
{
|
{
|
||||||
if ( (flags & O_LOWERFLAGS) == O_SEARCH )
|
if ( path[0] == 0 || (path[0] == '/' && path[1] == 0) )
|
||||||
{
|
{
|
||||||
if ( path[0] == 0 || (path[0] == '/' && path[1] == 0) ) { return new DevRAMFSDir(this); }
|
if ( (flags & O_LOWERFLAGS) == O_SEARCH )
|
||||||
Error::Set(Error::ENOTDIR);
|
{
|
||||||
|
return new DevRAMFSDir(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Error::Set(Error::EISDIR);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue