Skip to content

Commit 0d51015

Browse files
committed
added "/O" for the xcopy command
1 parent cd73101 commit 0d51015

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

additionals/DisableWD.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ for %%j in (
3030
if not exist "%%j.revi" if exist %%j (
3131
takeown /F %%j /A >NUL 2>nul
3232
icacls %%j /grant Administrators:F >NUL 2>nul
33-
xcopy "%%j" "%%j.revi" >NUL 2>nul
33+
xcopy "%%j" "%%j.revi" /O >NUL 2>nul
3434
del "%%j" >NUL 2>nul
3535
)
3636
)

lib/screens/settings.dart

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,23 @@ class _SettingsPageState extends State<SettingsPage> {
6060
label: ReviLocalizations.of(context).settingsEPTLabel,
6161
// description: ReviLocalizations.of(context).settingsEPTDescription,
6262
switchBool: expBool,
63-
function: (value) {
63+
function: (value) =>
6464
setState(() {
65-
if (value) {
66-
writeRegistryDword(Registry.localMachine,
67-
r'SOFTWARE\Revision\Revision Tool', 'Experimental', 1);
68-
} else {
69-
writeRegistryDword(Registry.localMachine,
70-
r'SOFTWARE\Revision\Revision Tool', 'Experimental', 0);
71-
}
65+
writeRegistryDword(Registry.localMachine,
66+
r'SOFTWARE\Revision\Revision Tool', 'Experimental', value ? 1 : 0);
7267
expBool = value;
73-
});
74-
},
68+
})
69+
,
7570
),
7671
CardHighlight(
7772
label: ReviLocalizations.of(context).settingsUpdateLabel,
7873
icon: msicons.FluentIcons.arrow_clockwise_20_regular,
7974
child: FilledButton(
8075
child: Text(_updateTitle),
8176
onPressed: () async {
82-
Directory tempDir = await getTemporaryDirectory();
83-
PackageInfo packageInfo = await PackageInfo.fromPlatform();
84-
int currentVersion =
77+
final Directory tempDir = await getTemporaryDirectory();
78+
final PackageInfo packageInfo = await PackageInfo.fromPlatform();
79+
final int currentVersion =
8580
int.parse(packageInfo.version.replaceAll(".", ""));
8681
Map<String, dynamic> data = await Network.getJSON(
8782
"https://api.github.com/repos/meetrevision/revision-tool/releases/latest");
@@ -162,7 +157,7 @@ class _SettingsPageState extends State<SettingsPage> {
162157
),
163158
);
164159
},
165-
items: [
160+
items: const [
166161
ComboBoxItem(
167162
value: 'en_US',
168163
child: Text('English'),

0 commit comments

Comments
 (0)