mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-05 14:35:43 +00:00
Fix risk of having only WTelegram.session.tmp if killing the program in the middle of Delete/Move
(that's what File.Replace was trying to avoid!!)
This commit is contained in:
parent
a7fcbf60fa
commit
4739c9f539
2 changed files with 9 additions and 12 deletions
|
|
@ -91,8 +91,8 @@ namespace WTelegram
|
|||
lock (this)
|
||||
{
|
||||
File.WriteAllBytes(tempPathname, output);
|
||||
File.Delete(_pathname);
|
||||
File.Move(tempPathname, _pathname);
|
||||
File.Copy(tempPathname, _pathname, true);
|
||||
File.Delete(tempPathname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue