Skip to content
Snippets Groups Projects
Commit fbed5179 authored by Or Cohen's avatar Or Cohen
Browse files

vfs_task: Fix path conversion in certain cases


task_conv was wrongly converting "/.." and produced a path with unexpected
characters after /
Consequently, repeated calls (Java) to 'new File("/..").exists()' returned
ambigous results, not to mention other properties like isDirectory.

This confused the shell's completion mechanism (and me).

In more detail, in this (/..) situation 'len' was more than 2 (in line 105) which
caused 'tgt' to be pointing before the begining of 'full', from that point
whatever stopped the backward search for '/' (lines 109-112) was unexpected.
I guess this might occur with other combinations.

This sets 'len' to be 1 when starting an absolute path conversion, to match
the behavior where relative path conversion sets 'len = strlen(cwd)'.

Signed-off-by: default avatarOr Cohen <orc@fewbytes.com>
parent fec7775d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment