relative path fix
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# 6.0.3.2 (2022-0?-??)
|
# 6.0.3.2 (2022-0?-??)
|
||||||
|
|
||||||
- Support multiple folders input (regression fix).
|
- Support multiple folders input (regression fix).
|
||||||
- Relative file input paths are internally converted to absolute paths.
|
- Relative file input paths are converted to absolute paths.
|
||||||
|
|
||||||
|
|
||||||
# 6.0.3.1 (2022-07-30)
|
# 6.0.3.1 (2022-07-30)
|
||||||
|
|||||||
@@ -1210,11 +1210,7 @@ namespace mpvnet
|
|||||||
if (file.Contains("|"))
|
if (file.Contains("|"))
|
||||||
file = file.Substring(0, file.IndexOf("|"));
|
file = file.Substring(0, file.IndexOf("|"));
|
||||||
|
|
||||||
if ((file.Contains(":/") && !file.Contains("://")) || (file.Contains(":\\") && file.Contains("/")))
|
file = ConvertFilePath(file);
|
||||||
file = file.Replace("/", "\\");
|
|
||||||
|
|
||||||
if (!file.Contains(":") && !file.StartsWith("\\\\") && File.Exists(file))
|
|
||||||
file = System.IO.Path.GetFullPath(file);
|
|
||||||
|
|
||||||
string ext = file.Ext();
|
string ext = file.Ext();
|
||||||
|
|
||||||
@@ -1249,6 +1245,17 @@ namespace mpvnet
|
|||||||
SetPropertyInt("playlist-pos", 0);
|
SetPropertyInt("playlist-pos", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string ConvertFilePath(string path)
|
||||||
|
{
|
||||||
|
if ((path.Contains(":/") && !path.Contains("://")) || (path.Contains(":\\") && path.Contains("/")))
|
||||||
|
path = path.Replace("/", "\\");
|
||||||
|
|
||||||
|
if (!path.Contains(":") && !path.StartsWith("\\\\") && File.Exists(path))
|
||||||
|
path = System.IO.Path.GetFullPath(path);
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadISO(string path)
|
public void LoadISO(string path)
|
||||||
{
|
{
|
||||||
long gb = new FileInfo(path).Length / 1024 / 1024 / 1024;
|
long gb = new FileInfo(path).Length / 1024 / 1024 / 1024;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -747,8 +746,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
string path = Core.GetPropertyString("path");
|
string path = Core.GetPropertyString("path");
|
||||||
|
|
||||||
if ((path.Contains(":/") && !path.Contains("://")) || (path.Contains(":\\") && path.Contains("/")))
|
path = Core.ConvertFilePath(path);
|
||||||
path = path.Replace("/", "\\");
|
|
||||||
|
|
||||||
if (path.Contains("://"))
|
if (path.Contains("://"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user