diff options
Diffstat (limited to 'libphobos/src/std/file.d')
-rw-r--r-- | libphobos/src/std/file.d | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libphobos/src/std/file.d b/libphobos/src/std/file.d index c3466ac..0b8da50 100644 --- a/libphobos/src/std/file.d +++ b/libphobos/src/std/file.d @@ -983,10 +983,10 @@ private void renameImpl(scope const(char)[] f, scope const(char)[] t, import std.conv : to, text; if (!f) - f = to!(typeof(f))(fromz[0 .. wcslen(fromz)]); + f = fromz ? to!(typeof(f))(fromz[0 .. wcslen(fromz)]) : "(null)"; if (!t) - t = to!(typeof(t))(toz[0 .. wcslen(toz)]); + t = toz ? to!(typeof(t))(toz[0 .. wcslen(toz)]) : "(null)"; enforce(false, new FileException( |