breaking change: arrays of char do not convert to cstring; ptr to array of char does

This commit is contained in:
Andreas Rumpf 2017-10-10 00:17:20 +02:00
commit 3308d26581
12 changed files with 73 additions and 36 deletions

View file

@ -790,7 +790,10 @@ iterator walkDir*(dir: string; relative=false): tuple[kind: PathComponent, path:
while true:
var x = readdir(d)
if x == nil: break
var y = $x.d_name.cstring
when defined(nimNoArrayToCstringConversion):
var y = $cstring(addr x.d_name)
else:
var y = $x.d_name.cstring
if y != "." and y != "..":
var s: Stat
if not relative: