aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Paths.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-03 11:38:36 -0400
committerMichael <[email protected]>2017-07-03 11:38:36 -0400
commit659ccfb29d68df8c8ae64501186cdbf4d87c1d52 (patch)
treed39bd5883b88412680ab55aa9df84ba0cd187e64 /ShiftOS_TheReturn/Paths.cs
parentbe6cd3a0c02168b998e58b77a4d08a4b7cb8cfe3 (diff)
parent31bfa571a3f10dcb44c298f5be963b4919179d81 (diff)
downloadshiftos_thereturn-659ccfb29d68df8c8ae64501186cdbf4d87c1d52.tar.gz
shiftos_thereturn-659ccfb29d68df8c8ae64501186cdbf4d87c1d52.tar.bz2
shiftos_thereturn-659ccfb29d68df8c8ae64501186cdbf4d87c1d52.zip
Merge remote-tracking branch 'refs/remotes/origin/master' into monogame
Diffstat (limited to 'ShiftOS_TheReturn/Paths.cs')
-rw-r--r--ShiftOS_TheReturn/Paths.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/ShiftOS_TheReturn/Paths.cs b/ShiftOS_TheReturn/Paths.cs
index 332cdd3..5827af2 100644
--- a/ShiftOS_TheReturn/Paths.cs
+++ b/ShiftOS_TheReturn/Paths.cs
@@ -172,7 +172,7 @@ namespace ShiftOS.Engine
{
if (dir.StartsWith("1:/"))
{
- string real = dir.Replace("/", "\\").Replace("1:", SharedFolder);
+ string real = dir.Replace('/', System.IO.Path.DirectorySeparatorChar).Replace("1:", SharedFolder);
if (!System.IO.Directory.Exists(real))
System.IO.Directory.CreateDirectory(real);
}
@@ -186,7 +186,8 @@ namespace ShiftOS.Engine
{
if (dir.StartsWith("1:/"))
{
- string real = dir.Replace("/", "\\").Replace("1:", SharedFolder);
+ string real = dir.Replace('/', System.IO.Path.DirectorySeparatorChar).Replace("1:", SharedFolder);
+
if (System.IO.Directory.Exists(real))
System.IO.Directory.Delete(real, true);
}
@@ -200,7 +201,7 @@ namespace ShiftOS.Engine
{
if (dir.StartsWith("1:/"))
{
- string real = dir.Replace("/", "\\").Replace("1:", SharedFolder);
+ string real = dir.Replace('/', System.IO.Path.DirectorySeparatorChar).Replace("1:", SharedFolder);
System.IO.File.WriteAllBytes(real, ReadAllBytes(dir));
}
}
@@ -213,7 +214,7 @@ namespace ShiftOS.Engine
{
if (dir.StartsWith("1:/"))
{
- string real = dir.Replace("/", "\\").Replace("1:", SharedFolder);
+ string real = dir.Replace('/', System.IO.Path.DirectorySeparatorChar).Replace("1:", SharedFolder);
if (System.IO.File.Exists(real))
System.IO.File.Delete(real);
}
@@ -254,12 +255,12 @@ namespace ShiftOS.Engine
/// <summary>
/// Gets the ShiftOS shared folder.
/// </summary>
- public static string SharedFolder { get { return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\ShiftOS_Shared"; } }
+ public static string SharedFolder { get { return System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "ShiftOS_Shared"); } }
/// <summary>
/// Gets the location of the ShiftOS.mfs file.
/// </summary>
- public static string SaveFile { get { return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\ShiftOS.mfs"; } }
+ public static string SaveFile { get { return System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "ShiftOS.mfs"); } }
/// <summary>
/// Gets the path of the inner save file.