Filename always includes ;1 at the end, why?

I have some C# code that goes something like this:
using DiscUtils;
using DiscUtils.Common;
using DiscUtils.Iso9660;

public void PopulateUSBDrive(string isoSource, string volumeName) {
 using (FileStream isoStream = File.Open(@isoSource, FileMode.Open)) {
	CDReader iso = new CDReader(isoStream, true);
	CopyDirectoryTree(iso.Root, ref iso, volumeName);
	isoStream.Close();
 }
}
/// <summary>
/// Copies all files and folders from iso
/// </summary>
/// <param name="rootDir">Points to the current DiscDirectoryInfo that is the root of file copy operations</param>
/// <param name="iso">The CDReader object that represents the iso we are copying from</param>
/// <param name="destinationVolumeName">The volume name of the USB partion we are copying the iso to</param>
/// <returns></returns>
private List<DiscDirectoryInfo> CopyDirectoryTree(DiscDirectoryInfo rootDir, ref CDReader iso, string destinationVolumeName) {
 UsbDisk installDisk = usbDisks.Where(x => x.Volume == destinationVolumeName).FirstOrDefault<UsbDisk>();
 string installPartitionDriveLetter = installDisk != null ? installDisk.DiskLetter : String.Empty;

 if (!String.IsNullOrEmpty(installPartitionDriveLetter)) {
	string directory = installPartitionDriveLetter + "\\" + rootDir.FullName;
	if (!Directory.Exists(directory)) Directory.CreateDirectory(directory);
	foreach (var file in rootDir.GetFiles()) {
	   Stream fileStream = iso.OpenFile(file.FullName, FileMode.Open, FileAccess.Read);
	   using (FileStream output = new FileStream(installPartitionDriveLetter + (file.FullName.Contains(';') ? file.FullName.Split(';')[0] : file.FullName), FileMode.Create)) {                  
		  fileStream.CopyTo(output);
	   }
	}
	foreach (DiscDirectoryInfo subdir in rootDir.GetDirectories()) {
	   CopyDirectoryTree(subdir, ref iso, destinationVolumeName);
	}
 }        
 return rootDir.GetDirectories().ToList<DiscDirectoryInfo>();
}

Open in new window


file.FullName and file.Name will always end with ;1 for some reason, while the true filename does not end with ;1. To write to the correct file name, I have to split the string that represents the name at ; and take the first part as the valid file name(see line 28). Why does this happen, am I doing something wrong? Any way to avoid this?
LVL 2
itniflAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
First of all: It depends on the CDReader class and the libraries. Which I don't know.

It could be anything from level marker, file system index or bug..

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
itniflAuthor Commented:
A guy at work thought it was a version marker used in Linux file systems long time ago. I don't know, but I sure can't see any good use for it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.