fix update check

This commit is contained in:
chudov
2009-06-26 12:00:40 +00:00
parent eaff4dbc3a
commit 3ed977981e
6 changed files with 145 additions and 111 deletions

View File

@@ -514,7 +514,7 @@ namespace JDP {
if (resp.StatusCode == HttpStatusCode.OK)
{
using (Stream respStream = resp.GetResponseStream())
using (FileStream motd = new FileStream(MOTDImagePath, FileMode.CreateNew, FileAccess.Write))
using (FileStream motd = new FileStream(MOTDImagePath, FileMode.Create, FileAccess.Write))
{
byte[] buff = new byte[0x8000];
do
@@ -551,7 +551,7 @@ namespace JDP {
if (resp.StatusCode == HttpStatusCode.OK)
{
using (Stream respStream = resp.GetResponseStream())
using (FileStream motd = new FileStream(MOTDTextPath, FileMode.CreateNew, FileAccess.Write))
using (FileStream motd = new FileStream(MOTDTextPath, FileMode.Create, FileAccess.Write))
using (StreamReader sr = new StreamReader(respStream, Encoding.UTF8))
using (StreamWriter sw = new StreamWriter(motd, Encoding.UTF8))
{