OSDN Git Service
(root)
/
tdcgexplorer
/
tso2mqo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aeb7a3f
)
allow relative path for textures
author
nomeu
<nomeu@nomeu.org>
Mon, 25 Feb 2013 21:56:17 +0000
(06:56 +0900)
committer
nomeu
<nomeu@nomeu.org>
Mon, 25 Feb 2013 21:56:17 +0000
(06:56 +0900)
TSOGenerator.cs
patch
|
blob
|
history
diff --git
a/TSOGenerator.cs
b/TSOGenerator.cs
index
b295f39
..
47a638c
100644
(file)
--- a/
TSOGenerator.cs
+++ b/
TSOGenerator.cs
@@
-138,8
+138,11
@@
namespace Tso2MqoGui
string file= i.file;
\r
string name= i.name;
\r
\r
string file= i.file;
\r
string name= i.name;
\r
\r
+ string file_directory_name = Path.GetDirectoryName(file);
\r
+ string file_name = Path.GetFileName(file);
\r
+
\r
WriteString(bw, name);
\r
WriteString(bw, name);
\r
- WriteString(bw, "\"" +
Path.GetFileName(file)
+ "\"");
\r
+ WriteString(bw, "\"" +
file_name
+ "\"");
\r
\r
// テクスチャの読み込み
\r
TSOTex tex = LoadTex(file);
\r
\r
// テクスチャの読み込み
\r
TSOTex tex = LoadTex(file);
\r
@@
-153,9
+156,9
@@
namespace Tso2MqoGui
ii.textures.Add(iti);
\r
\r
// テクスチャが同じフォルダにない場合、コピーしておく
\r
ii.textures.Add(iti);
\r
\r
// テクスチャが同じフォルダにない場合、コピーしておく
\r
- if
(Path.GetDirectoryName(file)
.ToUpper() != dir.ToUpper())
\r
+ if
(file_directory_name != "" && file_directory_name
.ToUpper() != dir.ToUpper())
\r
{
\r
{
\r
- iti.File = Path.Combine(dir,
Path.GetFileName(file)
);
\r
+ iti.File = Path.Combine(dir,
file_name
);
\r
File.Copy(file, iti.File, true);
\r
}
\r
}
\r
File.Copy(file, iti.File, true);
\r
}
\r
}
\r