Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
除外ファイル変更
Browse files Browse the repository at this point in the history
  • Loading branch information
kinchanramen committed Mar 18, 2024
1 parent 0c079b4 commit dff3f7d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions FolderCopy/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,20 @@ private void button1_Click(object sender, EventArgs e)
string sourceDirName = textBox1.Text;
// コピー後のディレクトリパス
string destDirName = textBox2.Text;
string pathnamesource=Path.GetFileName(sourceDirName);
string pathnamedest=Path.GetFileName(destDirName);
/*if (pathnamesource!=".minecraft"||pathnamedest!=".minecraft") {
MessageBox.Show("パスは[.minecraft]まで必要です");
}*/


// ディレクトリをコピーする
CopyDirectory(sourceDirName, destDirName);
if (!options.Checked && !config.Checked && !resourcepacks.Checked && !schematics.Checked && !saves.Checked && !screenshots.Checked && !XaeroWaypoints.Checked && !XaeroWorldMap.Checked && !String.IsNullOrEmpty(textBox1.Text) && !String.IsNullOrEmpty(textBox2.Text))
if (pathnamesource != ".minecraft" || pathnamedest != ".minecraft")
{
MessageBox.Show("パスは[.minecraft]まで必要です");
}
else if (!options.Checked && !config.Checked && !resourcepacks.Checked && !schematics.Checked && !saves.Checked && !screenshots.Checked && !XaeroWaypoints.Checked && !XaeroWorldMap.Checked && !String.IsNullOrEmpty(textBox1.Text) && !String.IsNullOrEmpty(textBox2.Text))
{
MessageBox.Show("何も選択されていません");
}
Expand Down Expand Up @@ -144,7 +153,7 @@ public void CopyDirectory2(string sourceDirName, string destDirName)
string[] files = Directory.GetFiles(sourceDirName);
foreach (string file in files)
{
if (Path.GetFileName(file) == "hanemod-client.toml")
if (Path.GetFileName(file) == "hanemod-client.json")
{
Console.WriteLine("hanemodのconfigは移行できません");
}
Expand Down

0 comments on commit dff3f7d

Please sign in to comment.