Skip to content

Commit 4cfe280

Browse files
ComputerEliteComputerElite
authored andcommitted
try catch? I'm tired
1 parent 2ec75ba commit 4cfe280

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

QuestAppVersionSwitcher/FolderPermission.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,15 @@ public static string RemapPathForApi300OrAbove(string path)
5353

5454
public static void Copy(string from, string to)
5555
{
56-
Stream file = GetOutputStream(to);
57-
file.Write(File.ReadAllBytes(from));
58-
file.Close();
59-
file.Dispose();
56+
try
57+
{
58+
Stream file = GetOutputStream(to);
59+
file.Write(File.ReadAllBytes(from));
60+
file.Close();
61+
} catch (Exception e)
62+
{
63+
ComputerUtils.Android.Logging.Logger.Log(e.ToString());
64+
}
6065
}
6166

6267
public static void CreateDirectory(string dir)

0 commit comments

Comments
 (0)