[Mono-bugs] [Bug 44446][Wis] New - Directory.CreateDirectory() hangs w/ high CPU usage

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 10 Jun 2003 16:42:54 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by breiter@wolfereiter.com.

http://bugzilla.ximian.com/show_bug.cgi?id=44446

--- shadow/44446	Tue Jun 10 16:42:54 2003
+++ shadow/44446.tmp.1280	Tue Jun 10 16:42:54 2003
@@ -0,0 +1,42 @@
+Bug#: 44446
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 5.1 (Build 2600.xpsp2.030422-1633 : Service Pack 1)
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: breiter@wolfereiter.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Directory.CreateDirectory() hangs w/ high CPU usage
+
+Creating a directory with System.IO.Directory.CreateDirectory hangs mono 
+0.24.
+
+private string CreateOutDir()
+{
+	string cDir,timeStmp,subDir;
+	cDir	= System.IO.Directory.GetCurrentDirectory();
+	timeStmp= DateTime.Now.ToString("s").Replace(":","-");
+	
+	// use / for UNIX filesystems and \ for Windows
+	if(cDir.IndexOf("/")>-1)
+		cDir += "/";
+	else
+		cDir += "\\";
+
+	// assemble directory string
+	subDir = cDir + timeStmp;
+	
+	// create directory in filesystem
+	// hangs here
+	Directory.CreateDirectory(subDir);
+	
+	return subDir;
+}