mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 02:01:36 +03:00
icons: Avoid use of rename when installing icon pack
rename does not work across filesystems. /tmp is often in a tmpfs filesystem, and thus installing the icon pack fails. Solve this by using a copy/delete pattern instead of rename Fixes https://github.com/Yubico/yubioath-flutter/issues/1051
This commit is contained in:
parent
5f407bbe95
commit
13d0ccc756
@ -24,6 +24,7 @@ import 'package:logging/logging.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
import 'package:io/io.dart';
|
||||
|
||||
import 'icon_cache.dart';
|
||||
import 'icon_pack.dart';
|
||||
@ -166,7 +167,7 @@ class IconPackManager extends StateNotifier<AsyncValue<IconPack?>> {
|
||||
_iconCache.memCache.clear();
|
||||
|
||||
// moves unpacked files to the directory final directory
|
||||
await unpackDirectory.rename(packDirectory.path);
|
||||
await copyPath(unpackDirectory.path, packDirectory.path);
|
||||
|
||||
readPack();
|
||||
|
||||
|
@ -357,7 +357,7 @@ packages:
|
||||
source: hosted
|
||||
version: "0.17.0"
|
||||
io:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: io
|
||||
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
|
||||
|
@ -63,6 +63,7 @@ dependencies:
|
||||
crypto: ^3.0.2
|
||||
tray_manager: ^0.2.0
|
||||
local_notifier: ^0.1.5
|
||||
io: ^1.0.4
|
||||
|
||||
dev_dependencies:
|
||||
integration_test:
|
||||
|
Loading…
Reference in New Issue
Block a user