Skip to content

Commit

Permalink
Fix line ending
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Sep 9, 2022
1 parent 6f0ecfc commit bdfb06f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/pages/logger.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:io';

import 'package:desktop_adb_file_browser/utils/adb.dart';
Expand Down Expand Up @@ -111,7 +112,9 @@ class LogPage extends StatelessWidget {
var file = File(path);
var writer = file.openWrite();

writer.writeAll(logs, Adb.hostPath.separator);
String lineEnding = Platform.isWindows ? '\n\r' : '\n';

writer.writeAll(logs, lineEnding);
await writer.flush();
await writer.close();

Expand Down

0 comments on commit bdfb06f

Please sign in to comment.