@@ -140,14 +140,9 @@ FileInfo vroot_stat(const char* path)
140
140
char fullPath [300 ];
141
141
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "path:\"%s\"" , path );
142
142
143
- while (cPathSep == * path )
144
- {
145
- path ++ ;
146
- }
147
-
148
143
if (NULL != currentAccessor )
149
144
{
150
- sprintf (fullPath , "%s%s" , cwd , path );
145
+ sprintf (fullPath , "%s" PathSep " %s" , cwd , path );
151
146
return currentAccessor -> stat (fullPath );
152
147
}
153
148
@@ -171,10 +166,6 @@ int vroot_rename(const char* path, const char* newName)
171
166
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "old:\"%s\" -> \"%s\"" , path , newName );
172
167
if (NULL != currentAccessor )
173
168
{
174
- while (cPathSep == * path )
175
- {
176
- path ++ ;
177
- }
178
169
//TODO: Make sure newName has proper path */
179
170
return currentAccessor -> rename (path , newName );
180
171
}
@@ -188,10 +179,6 @@ int vroot_mkdir(const char* path)
188
179
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "path:\"%s\"" , path );
189
180
if (NULL != currentAccessor )
190
181
{
191
- while (cPathSep == * path )
192
- {
193
- path ++ ;
194
- }
195
182
return currentAccessor -> mkdir (path );
196
183
}
197
184
XBlastLogger (DEBUG_VROOT , DBG_LVL_ERROR , "Error!!! No file op in vroot." );
@@ -204,10 +191,6 @@ int vroot_remove(const char* path)
204
191
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "path:\"%s\"" , path );
205
192
if (NULL != currentAccessor )
206
193
{
207
- while (cPathSep == * path )
208
- {
209
- path ++ ;
210
- }
211
194
return currentAccessor -> remove (path );
212
195
}
213
196
XBlastLogger (DEBUG_VROOT , DBG_LVL_ERROR , "Error!!! No file op in vroot." );
@@ -258,10 +241,6 @@ DIREX vroot_opendir(const char* path)
258
241
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "path:\"%s\"" , path );
259
242
if (NULL != currentAccessor )
260
243
{
261
- while (cPathSep == * path )
262
- {
263
- path ++ ;
264
- }
265
244
return currentAccessor -> opendir (path );
266
245
}
267
246
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "Returning vroot handle." );
@@ -293,7 +272,7 @@ FileInfo vroot_readdir(DIREX handle)
293
272
virtualRootCycler = FatFSAccess .getEntryName (virtualRootCycler , & string );
294
273
if (NULL != string )
295
274
{
296
- sprintf (returnStruct .name , "%s: " , string );
275
+ sprintf (returnStruct .name , "%s" , string );
297
276
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "found:\"%s\"" , returnStruct .name );
298
277
returnStruct .nameLength = strlen (returnStruct .name );
299
278
}
@@ -332,11 +311,6 @@ static int pathProcess_Absolute(const char* const path)
332
311
return 0 ;
333
312
}
334
313
335
- while (cPathSep == * sepPos )
336
- {
337
- sepPos ++ ;
338
- }
339
-
340
314
result = FatFSAccess .chdir (sepPos );
341
315
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "chdir:\"%s\" result:%u." , sepPos , result );
342
316
if (0 == result )
@@ -356,10 +330,10 @@ static int pathProcess_GoingForward(const char* const path)
356
330
357
331
if (cPathSep != * path )
358
332
{
359
- sprintf (fullPath , "%s%s" PathSep , cwd , path );
333
+ sprintf (fullPath , "%s" PathSep " %s"PathSep , cwd , path );
360
334
XBlastLogger (DEBUG_VROOT , DBG_LVL_DEBUG , "New path:\"%s\"." , fullPath );
361
335
362
- if (0 == FatFSAccess .chdir (fullPath + strlen ( PathSep ) ))
336
+ if (0 == FatFSAccess .chdir (fullPath ))
363
337
{
364
338
currentAccessor = & FatFSAccess ;
365
339
strcpy (cwd , fullPath );
0 commit comments