Not working well
Closed this issue · 1 comments
Deleted user commented
var home = '/home/foo/';
var path = '/bar';
var absolutePath = p.join(home, path);
// got /bar
print(absolutePath);
natebosch commented
/bar
is already an absolute path. See the docs for join
which say:
If a part is an absolute path, then anything before that will be ignored
https://pub.dev/documentation/path/latest/path/join.html
You want
var home = '/home/foo';
var path = 'bar'
var absolutePath = p.join(home, path);