ms store issue fix

This commit is contained in:
stax76
2022-03-05 09:51:39 +01:00
parent 5fb888262e
commit e8d6081f9f
2 changed files with 17 additions and 2 deletions

View File

@@ -106,7 +106,6 @@ mpv.net searches the config folder at:
1. startup\portable_config 1. startup\portable_config
2. %APPDATA%\mpv.net (`C:\Users\%USERNAME%\AppData\Roaming\mpv.net`) 2. %APPDATA%\mpv.net (`C:\Users\%USERNAME%\AppData\Roaming\mpv.net`)
3. For Microsoft Store version (`%LOCALAPPDATA%\Packages\5664FrankSkare.mpv.net_0ta2kwwjvkgap\LocalCache\Roaming\mpv.net`)
mpv options are stored in the file mpv.conf, mpv options are stored in the file mpv.conf,
mpv.net options are stored in the file mpvnet.conf, mpv.net options are stored in the file mpvnet.conf,

View File

@@ -1,6 +1,7 @@
 
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.Drawing.Imaging; using System.Drawing.Imaging;
@@ -236,6 +237,21 @@ namespace mpvnet
_ConfigFolder = Folder.AppData + "mpv.net"; _ConfigFolder = Folder.AppData + "mpv.net";
if (!Directory.Exists(_ConfigFolder)) if (!Directory.Exists(_ConfigFolder))
{
using (Process proc = new Process())
{
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.FileName = "powershell.exe";
proc.StartInfo.Arguments = $@"-Command New-Item -Path '{_ConfigFolder}' -ItemType Directory";
proc.Start();
proc.WaitForExit();
}
if (!Directory.Exists(_ConfigFolder))
Directory.CreateDirectory(_ConfigFolder);
}
Directory.CreateDirectory(_ConfigFolder); Directory.CreateDirectory(_ConfigFolder);
_ConfigFolder = _ConfigFolder.AddSep(); _ConfigFolder = _ConfigFolder.AddSep();