fixed bug

This commit is contained in:
Perfare
2017-11-29 03:57:32 +08:00
parent e75b9858da
commit 40153f6f19
3 changed files with 26 additions and 12 deletions

View File

@ -1595,7 +1595,7 @@ namespace Unity_Studio
if (m_Texture2D.image_data == null)
return false;
var convert = (bool)Properties.Settings.Default["convertTexture"];
if (convert)
if (convert && asset.extension != ".dat")
{
ImageFormat format = null;
var ext = (string)Properties.Settings.Default["convertType"];
@ -1863,7 +1863,7 @@ namespace Unity_Studio
return false;
}
private static string FixFileName(string str)
public static string FixFileName(string str)
{
if (str.Length >= 260) return Path.GetRandomFileName();
return Path.GetInvalidFileNameChars().Aggregate(str, (current, c) => current.Replace(c, '_'));