Files
SpotiFLAC-Mobile/lib/utils/native_platform_name.dart
T
zarzet a86bcd0190 fix(desktop): report the desktop platform to native jobs and logs
Native backup and library jobs received 'ios' on desktop. Send the
desktop OS name so the backend applies no mobile path handling, and
describe desktop hosts in log exports.
2026-10-20 13:44:35 +07:00

14 lines
535 B
Dart

import 'dart:io' show Platform;
import 'package:mornye/utils/desktop_platform.dart';
/// Platform label sent with native data jobs: `android`, `ios`, or the
/// desktop OS (`macos`, `windows`, `linux`). The native backend applies
/// Android SAF keys and iOS container rebasing only for those exact values,
/// so desktop paths pass through unchanged. It is never stored in backups.
String nativePlatformName() {
if (Platform.isAndroid) return 'android';
if (isDesktopPlatform) return Platform.operatingSystem;
return 'ios';
}