Author: jwilcox
Date: 2006-06-16 14:01:26 -0400 (Fri, 16 Jun 2006)
New Revision: 61810
Modified:
trunk/ipod-sharp/ChangeLog
trunk/ipod-sharp/src/Device.cs
trunk/ipod-sharp/tests/IPodTests.cs
Log:
2006-06-16 James Willcox <[EMAIL PROTECTED]>
* fix the test cases
Modified: trunk/ipod-sharp/ChangeLog
===================================================================
--- trunk/ipod-sharp/ChangeLog 2006-06-16 17:33:29 UTC (rev 61809)
+++ trunk/ipod-sharp/ChangeLog 2006-06-16 18:01:26 UTC (rev 61810)
@@ -1,5 +1,9 @@
2006-06-16 James Willcox <[EMAIL PROTECTED]>
+ * fix the test cases
+
+2006-06-16 James Willcox <[EMAIL PROTECTED]>
+
* Use IList<T> instead of ReadOnlyCollection<T> in the public API
2006-06-16 James Willcox <[EMAIL PROTECTED]>
Modified: trunk/ipod-sharp/src/Device.cs
===================================================================
--- trunk/ipod-sharp/src/Device.cs 2006-06-16 17:33:29 UTC (rev 61809)
+++ trunk/ipod-sharp/src/Device.cs 2006-06-16 18:01:26 UTC (rev 61810)
@@ -353,9 +353,13 @@
private void LoadEqualizers () {
equalizers = new ArrayList ();
+
+ eqsrec = new EqualizerContainerRecord ();
+
+ if (!File.Exists (EqDbPath))
+ return;
using (BinaryReader reader = new BinaryReader (File.Open
(EqDbPath, FileMode.Open))) {
- eqsrec = new EqualizerContainerRecord ();
eqsrec.Read (reader);
foreach (EqualizerRecord eqrec in eqsrec.EqualizerRecords) {
@@ -410,7 +414,8 @@
try {
// Back up the eq db
- File.Copy (EqDbPath, EqDbPath + ".bak", true);
+ if (File.Exists (EqDbPath))
+ File.Copy (EqDbPath, EqDbPath + ".bak", true);
// Save the eq db
using (BinaryWriter writer = new BinaryWriter (new FileStream
(EqDbPath, FileMode.Create))) {
Modified: trunk/ipod-sharp/tests/IPodTests.cs
===================================================================
--- trunk/ipod-sharp/tests/IPodTests.cs 2006-06-16 17:33:29 UTC (rev 61809)
+++ trunk/ipod-sharp/tests/IPodTests.cs 2006-06-16 18:01:26 UTC (rev 61810)
@@ -63,7 +63,9 @@
if (proc.ExitCode != 0)
throw new ApplicationException ("Unable to untar test: " +
errors);
- Directory.Move ("ipod-test-db", testdir + "/ipod-test-db");
+ // this is just sad
+ proc = Process.Start (String.Format ("mv ipod-test-db
{0}/ipod-test-db", testdir));
+ proc.WaitForExit ();
return GetDevice ();
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches