From b2f2e42d9ac97c61f58b0340ed0e8a36a6f695a3 Mon Sep 17 00:00:00 2001 From: redsolver Date: Tue, 9 Mar 2021 09:01:14 +0100 Subject: [PATCH] Added custom Windows cache path --- bin/yt_splitter.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/yt_splitter.dart b/bin/yt_splitter.dart index f4c1110..49e9ee7 100644 --- a/bin/yt_splitter.dart +++ b/bin/yt_splitter.dart @@ -24,7 +24,11 @@ void main(List arguments) async { print('YT video: $videoId...'); - final path = join(cacheHome.path, 'yt-splitter', videoId); + final path = join( // TODO Maybe fallback to /tmp + Platform.isWindows ? Platform.environment['TMP'] : cacheHome.path, + 'yt-splitter', + videoId, + ); Directory(path).createSync(recursive: true);