Login | Register
My pages Projects Community openCollabNet

Discussions > commits > [chorns] 585: Delete junction only if using virtual disks

sin
Discussion topic

Back to topic list

[chorns] 585: Delete junction only if using virtual disks

Reply

Author chorns
Full name Casper Hornstrup
Date 2006-01-07 10:51:18 PST
Message Delete junction only if using virtual disks
Modified: trunk/Sin.Library/Sl​aveWorkingDirectory.​cs
Modified: trunk/Sin.Library/Wo​rkingDirectory.cs
Property changes on: trunk
____________________​____________________​____________________​_______
Name: svn:ignore
   - Sin.Configuration
build
bin
*.msi
*.zip
   + Sin.Configuration
build
bin
*.msi
*.zip
Data
  _____

Modified: trunk/Sin.Library/Sl​aveWorkingDirectory.​cs
--- trunk/Sin.Library/Sl​aveWorkingDirectory.​cs 2006-01-07 18:45:40 UTC
(rev 584)
+++ trunk/Sin.Library/Sl​aveWorkingDirectory.​cs 2006-01-07 18:50:29 UTC
(rev 585)
@@ -94,7 +94,7 @@

         /// </summary>
         public void Clear()
         {
- if (Directory.Exists(Ju​nctionLocation))
+ if (Root.UseVirtualDisks &&
Directory.Exists(Jun​ctionLocation))
                 Directory.Delete(Jun​ctionLocation,
false);
             if (Directory.Exists(Location))
 
DirectoryHelper.Clea​rDirectory(Location)​;
  _____

Modified: trunk/Sin.Library/Wo​rkingDirectory.cs
--- trunk/Sin.Library/Wo​rkingDirectory.cs 2006-01-07 18:45:40 UTC
(rev 584)
+++ trunk/Sin.Library/Wo​rkingDirectory.cs 2006-01-07 18:50:29 UTC
(rev 585)
@@ -72,7 +72,7 @@

         /// <summary>
         /// Working directory collection.
         /// </summary>
- private RootWorkingDirectory rootWorkingDirectory;
+ protected RootWorkingDirectory Root;
         
         protected ILogger logger;
 
@@ -86,7 +86,7 @@
         {
             get
             {
- if
(rootWorkingDirector​y.UseVirtualDisks)
+ if (Root.UseVirtualDisks)
                     return Path.Combine(Location,
 
"VirtualDisk");
                 else
@@ -108,7 +108,7 @@
         {
             get
             {
- if
(rootWorkingDirector​y.UseVirtualDisks)
+ if (Root.UseVirtualDisks)
                     return
Path.Combine(JunctionLocation,
                                         "data");
                 else
@@ -140,7 +140,7 @@
                                 string branch,
                                 Revision currentRevision)
         {
- this.rootWorkingDirectory =
rootWorkingDirectory;
+ this.Root = rootWorkingDirectory;
             this.logger = logger;
             this.Branch = branch;
             this.CurrentRevision = currentRevision;
@@ -163,7 +163,7 @@
         /// </remarks>
         public void BeginAccess()
         {
- if (rootWorkingDirector​y.UseVirtualDisks)
+ if (Root.UseVirtualDisks)
             {
                 WriteLog(Severity.Debug,
                     String.Format("BeginAccess()
{0}.",
@@ -172,7 +172,7 @@
                 if (virtualDiskMounted)
                     throw new
InvalidOperationExce​ption("BeginAccess()​ already called. Call
EndAccess() first.");
 
-
rootWorkingDirectory​.AcquireVirtualDiskL​ock();
+ Root.AcquireVirtualDiskLock();
                 
                 try
                 {
@@ -184,7 +184,7 @@
                     BaseRemoteVirtualDiskObject
virtualDiskObject = (BaseRemoteVirtualDiskObject)
 
Activator.GetObject(​typeof(BaseRemoteVir​tualDiskObject),
 
VirtualDiskServiceAc​cess.VirtualDiskServ​iceRemotingUrl);
-
virtualDiskObject.Mo​untWithJunctionPoint​(rootWorkingDirector​y.VirtualDis
kNumber,
+
virtualDiskObject.Mo​untWithJunctionPoint​(Root.VirtualDiskNum​ber,
 
vmdk,
 
JunctionLocation);
                     if
(!Directory.Exists(J​unctionLocation))
@@ -198,7 +198,7 @@
                 }
                 catch (Exception)
                 {
-
rootWorkingDirectory​.ReleaseVirtualDiskL​ock();
+ Root.ReleaseVirtualDiskLock();
                     throw;
                 }
             }
@@ -212,7 +212,7 @@
         /// </remarks>
         public void EndAccess()
         {
- if (rootWorkingDirector​y.UseVirtualDisks)
+ if (Root.UseVirtualDisks)
             {
                 WriteLog(Severity.Debug,
                     String.Format("EndAccess()
{0}.",
@@ -232,7 +232,7 @@
                 }
                 finally
                 {
-
rootWorkingDirectory​.ReleaseVirtualDiskL​ock();
+ Root.ReleaseVirtualDiskLock();
                     virtualDiskMounted = false;
                 }
Attachments

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

[chorns] 585: Delete junction only if using virtual disks chorns Casper Hornstrup 2006-01-07 10:51:18 PST
Messages per page: