projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Crossport 1.2.4.1 to main.
[pintos-anon]
/
src
/
filesys
/
directory.c
diff --git
a/src/filesys/directory.c
b/src/filesys/directory.c
index ec6ecd98715d30ba99acff1449e15b0d440c92ea..b08e7eeba3f65947e0ffe51b097e0d7aa166d24c 100644
(file)
--- a/
src/filesys/directory.c
+++ b/
src/filesys/directory.c
@@
-140,7
+140,7
@@
dir_add (struct dir *d, const char *name, disk_sector_t inode_sector)
ASSERT (name != NULL);
ASSERT (lookup (d, name) == NULL);
- if (strlen (name) > NAME_MAX)
+ if (
*name == '\0' ||
strlen (name) > NAME_MAX)
return false;
for (i = 0; i < d->entry_cnt; i++)