virtual file system fixes.

This commit is contained in:
morkt
2015-09-01 08:52:47 +04:00
parent 857069cb33
commit 2ea64e25da
8 changed files with 70 additions and 215 deletions

View File

@@ -72,17 +72,20 @@ namespace GARbro.GUI
{
try
{
var candidates = new List<string>();
string dirname = Path.GetDirectoryName (this.Text);
if (!string.IsNullOrEmpty (dirname) && Directory.Exists (dirname))
if (!GameRes.VFS.IsVirtual)
{
foreach (var dir in Directory.GetDirectories (dirname))
var candidates = new List<string>();
string dirname = Path.GetDirectoryName (this.Text);
if (!string.IsNullOrEmpty (dirname) && Directory.Exists (dirname))
{
if (dir.StartsWith (dirname, StringComparison.CurrentCultureIgnoreCase))
candidates.Add (dir);
foreach (var dir in Directory.GetDirectories (dirname))
{
if (dir.StartsWith (dirname, StringComparison.CurrentCultureIgnoreCase))
candidates.Add (dir);
}
}
this.ItemsSource = candidates;
}
this.ItemsSource = candidates;
}
catch
{