permit the current directory name "." to be used in cfs_opendir.
This commit is contained in:
parent
2295df7246
commit
a258be684f
1 changed files with 5 additions and 6 deletions
|
@ -664,7 +664,7 @@ read_log_page(struct file_header *hdr, int16_t last_record, struct log_param *lp
|
||||||
static unsigned char *
|
static unsigned char *
|
||||||
create_log_name(unsigned char *new, int max_size, unsigned char *old)
|
create_log_name(unsigned char *new, int max_size, unsigned char *old)
|
||||||
{
|
{
|
||||||
unsigned char suffix[] = ".log";
|
const unsigned char suffix[] = ".log";
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = strlen(old);
|
len = strlen(old);
|
||||||
|
@ -1123,13 +1123,12 @@ int
|
||||||
cfs_opendir(struct cfs_dir *dir, const char *name)
|
cfs_opendir(struct cfs_dir *dir, const char *name)
|
||||||
{
|
{
|
||||||
/* We have only a root directory. */
|
/* We have only a root directory. */
|
||||||
if(name[0] != '/' || name[1] != '\0') {
|
if((name[0] == '/' || name[0] == '.') && name[1] != '\0') {
|
||||||
return -1;
|
*(coffee_page_t *)dir->dummy_space = 0;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*(coffee_page_t *)dir->dummy_space = 0;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in a new issue