Removed Windows support.

This commit is contained in:
flash 2023-09-04 14:56:53 +02:00
parent b793af9157
commit b6656506ee
2 changed files with 2 additions and 10 deletions

View file

@ -2,7 +2,6 @@
public class Config {
public string FileSystemPathV2 { get; set; }
public string MySqlDumpPathWindows { get; set; } = @"C:\Program Files\MariaDB 10.3\bin\mysqldump.exe";
public string MySqlDumpPath { get; set; } = @"mysqldump";
public string MySqlHost { get; set; } = @"localhost";
public string MySqlUser { get; set; }

View file

@ -17,9 +17,6 @@ namespace BackupManager
private const string CONFIG_NAME = @"FlashiiBackupManager.v1.xml";
public static bool IsWindows
=> RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
public readonly static DateTimeOffset Startup = DateTimeOffset.UtcNow;
public static string Basename
@ -39,10 +36,6 @@ namespace BackupManager
private static bool Headless;
public static string WindowsToUnixPath(this string path) {
return IsWindows ? path.Replace('\\', '/') : path;
}
public static Stream ToXml(this object obj, bool pretty = false) {
MemoryStream ms = new();
XmlSerializer xs = new(obj.GetType());
@ -215,7 +208,7 @@ namespace BackupManager
foreach(string file in storeFiles)
archive.CreateEntryFromFile(
file,
@"misuzu/store/" + file.Replace(storePath, string.Empty).WindowsToUnixPath().Trim('/'),
@"misuzu/store/" + file.Replace(storePath, string.Empty).Trim('/'),
CompressionLevel.Optimal
);
}
@ -241,7 +234,7 @@ namespace BackupManager
#endif
Process p = Process.Start(new ProcessStartInfo {
FileName = IsWindows ? Config.MySqlDumpPathWindows : Config.MySqlDumpPath,
FileName = Config.MySqlDumpPath,
Arguments = mysqldumpArgs.ToString(),
UseShellExecute = false,
CreateNoWindow = true,