@@ -79,10 +79,12 @@ void VirtualRootInit(void)
79
79
80
80
FILEX vroot_open (const char * path , FileOpenMode mode )
81
81
{
82
- XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "path:\"%s\" mode:%u" , path , mode );
82
+ char workPath [300 ];
83
+ sprintf (workPath , "%s%s" , cwd , path );
84
+ XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "path:\"%s\" mode:%u" , workPath , mode );
83
85
if (NULL != currentAccessor )
84
86
{
85
- return currentAccessor -> open (path , mode );
87
+ return currentAccessor -> open (workPath , mode );
86
88
}
87
89
XBlastLogger (DEBUG_VROOT , DBG_LVL_ERROR , "Error!!! No file op in vroot." );
88
90
@@ -142,7 +144,7 @@ FileInfo vroot_stat(const char* path)
142
144
143
145
if (NULL != currentAccessor )
144
146
{
145
- sprintf (fullPath , "%s" PathSep " %s" , cwd , path );
147
+ sprintf (fullPath , "%s%s" , cwd , path );
146
148
return currentAccessor -> stat (fullPath );
147
149
}
148
150
@@ -317,6 +319,7 @@ static int pathProcess_Absolute(const char* const path)
317
319
{
318
320
currentAccessor = & FatFSAccess ;
319
321
strcpy (cwd , path );
322
+ strcpy (cwd + strlen (cwd ), PathSep );
320
323
return 0 ;
321
324
}
322
325
XBlastLogger (DEBUG_VROOT , DBG_LVL_ERROR , "Error!!! Invalid path." );
0 commit comments