mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-15 17:11:19 +00:00
1c596661b7
* rename checkers -> Checkers * add SignedFile verifier and use it to verify the signed file
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System;
|
|
using System.IO;
|
|
|
|
using NLog;
|
|
|
|
namespace ZitiUpdateService.Checkers {
|
|
internal class FilesystemCheck : UpdateCheck {
|
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
|
string dest = null;
|
|
|
|
int isUpdateAvailable = 1;
|
|
public FilesystemCheck(int updateAvailable) {
|
|
this.isUpdateAvailable = updateAvailable;
|
|
}
|
|
|
|
override public bool AlreadyDownloaded(string destinationFolder, string destinationName) {
|
|
return File.Exists(Path.Combine(destinationFolder, destinationName));
|
|
}
|
|
|
|
override public void CopyUpdatePackage(string destinationFolder, string destinationName) {
|
|
dest = Path.Combine(destinationFolder, destinationName);
|
|
File.Copy(@"C:\git\github\openziti\desktop-edge-win\Installer\Output\" + FileName(), dest);
|
|
}
|
|
|
|
override public string FileName() {
|
|
return "Ziti Desktop Edge Client-1.3.0.exe";
|
|
}
|
|
|
|
override public int IsUpdateAvailable(Version current) {
|
|
return isUpdateAvailable;
|
|
}
|
|
|
|
override public bool HashIsValid(string destinationFolder, string destinationName) {
|
|
return true;
|
|
}
|
|
|
|
override public Version GetNextVersion() {
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|