diff --git a/lib/src/io.dart b/lib/src/io.dart
index 4d4ddd5a7101b40d7db0a264dcf20d384ef83196..8aae3e213fb86078c81776dc5b80749fa9cbe2f1 100644
--- a/lib/src/io.dart
+++ b/lib/src/io.dart
@@ -303,7 +303,10 @@ List<String> listDir(String dir, {bool recursive: false,
     if (pathInDir.contains("/.")) return false;
     if (Platform.operatingSystem != "windows") return true;
     return !pathInDir.contains("\\.");
-  }).map((entity) => entity.path).toList();
+  }).map((entity) {
+    if (Platform.operatingSystem != "windows") return entity.path;
+    return entity.path.replaceAll("/", "\\");
+  }).toList();
 }
 
 /// Returns whether [dir] exists on the file system.