Skip to content

Commit

Permalink
Fix file access from CUO
Browse files Browse the repository at this point in the history
  • Loading branch information
bittiez committed Feb 7, 2024
1 parent 4707314 commit 5b99284
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ClassicUO.Client/Game/Managers/ContainerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@

#endregion

using System.Collections.Generic;
using System.IO;
using ClassicUO.Configuration;
using ClassicUO.Game.Data;
using ClassicUO.Game.GameObjects;
using ClassicUO.Game.UI.Gumps;
using ClassicUO.Assets;
using ClassicUO.Renderer;
using ClassicUO.Utility;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using System.IO;

namespace ClassicUO.Game.Managers
{
Expand Down Expand Up @@ -257,7 +255,8 @@ public static void BuildContainerFile(bool force)
{
MakeDefault();

using (StreamWriter writer = new StreamWriter(File.Create(path)))
using (var stream = new FileStream(path, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite))
using (var writer = new StreamWriter(stream))
{
writer.WriteLine("# FORMAT");

Expand Down

0 comments on commit 5b99284

Please sign in to comment.