Various changes
authorPanagiotis Kanavos <pkanavos@gmail.com>
Thu, 15 Mar 2012 18:53:16 +0000 (20:53 +0200)
committerPanagiotis Kanavos <pkanavos@gmail.com>
Thu, 15 Mar 2012 18:53:16 +0000 (20:53 +0200)
21 files changed:
trunk/NetSparkle/NetSparkle.cs
trunk/Pithos.Client.WPF/LogConsole/LogConsoleViewModel.cs
trunk/Pithos.Client.WPF/Preferences/AddAccountView.xaml
trunk/Pithos.Client.WPF/Preferences/LoginView.xaml
trunk/Pithos.Client.WPF/Preferences/LoginView.xaml.cs
trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml
trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
trunk/Pithos.Client.WPF/Properties/AssemblyInfo.cs
trunk/Pithos.Client.WPF/Shell/AboutView.xaml
trunk/Pithos.Client.WPF/Shell/AboutViewModel.cs
trunk/Pithos.Client.WPF/Shell/FeedbackView.xaml
trunk/Pithos.Client.WPF/Shell/FeedbackViewModel.cs
trunk/Pithos.Client.WPF/Shell/MiniStatusView.xaml
trunk/Pithos.Client.WPF/Shell/MiniStatusViewModel.cs
trunk/Pithos.Client.WPF/Shell/ShellView.xaml
trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
trunk/Pithos.Core.Test/IdleBatchTest.cs
trunk/Pithos.Core/Agents/FileAgent.cs
trunk/Pithos.Core/Agents/FileEventIdleBatch.cs
trunk/Pithos.Core/Agents/FileSystemWatcherAdapter.cs
trunk/Pithos.Core/Agents/NetworkAgent.cs

index b621e81..8eddd83 100644 (file)
@@ -137,7 +137,9 @@ namespace AppLimit.NetSparkle
         /// This property defines if we trust every ssl connection also when 
         /// this connection has not a valid cert
         /// </summary>
-        public Boolean TrustEverySSLConnection { get; set; }      
+        public Boolean TrustEverySSLConnection { get; set; }
+
+        public string LatestVersion { get; set; }
 
         /// <summary>
         /// ctor which needs the appcast url
@@ -555,6 +557,7 @@ namespace AppLimit.NetSparkle
                 // check if update is required
                 NetSparkleAppCastItem latestVersion = null;
                 bUpdateRequired = IsUpdateRequired(config, out latestVersion);
+                this.LatestVersion = latestVersion.Version;                
                 if (!bUpdateRequired)
                     goto WaitSection;
 
index c8baee9..02d047f 100644 (file)
@@ -35,7 +35,7 @@ namespace Pithos.Client.WPF.LogConsole
         {
             get
             {
-                return "Pithos Log Console";
+                return "Pithos+ Log Console";
             }
             set
             {
index 8af7754..8290bad 100644 (file)
@@ -24,7 +24,7 @@
                                
                                     >
             <StackPanel >
-                <Label Content="Pithos Server" Target="{Binding ElementName=Servers}"  />
+                <Label Content="Pithos+ Server" Target="{Binding ElementName=Servers}"  />
                 <ComboBox x:Name="Servers" IsEditable="True" ItemsSource="{Binding Servers}"
                           Text="{Binding CurrentServer,ValidatesOnExceptions=True, Mode=TwoWay}" >                        
                     <Validation.ErrorTemplate>
index 0085e2e..77b6bc1 100644 (file)
@@ -18,7 +18,7 @@
             <Image Grid.Column="0" Width="16" Height="16" Source="/PithosPlus;component/Images/Tray.ico" />
             <TextBlock Text="URL:" Grid.Column="1" Margin="5,0,5,0" VerticalAlignment="Center"/>
             <TextBox Text="{Binding Path=Uri,ElementName=TheView}" Grid.Column="2" Margin="5,0,5,0" IsReadOnly="true"/>
-            <Button Content="Retry" Grid.Column="3"/>
+            <Button Content="Retry" Grid.Column="3" x:Name="Retry" Click="Retry_Click" Padding="2"/>
         </Grid>
         <WebBrowser Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Name="LoginBrowser" VerticalAlignment="Stretch" Navigating="LoginBrowser_Navigating" />
     </Grid>
index 1f5f450..9da6c7d 100644 (file)
@@ -92,5 +92,10 @@ namespace Pithos.Client.WPF.Preferences
         }
 
         public event PropertyChangedEventHandler PropertyChanged;
+
+        private void Retry_Click(object sender, RoutedEventArgs e)
+        {
+            LoginBrowser.Navigate(Uri);
+        }
     }
 }
index b309da6..9a25b3d 100644 (file)
@@ -5,7 +5,7 @@
         xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
         xmlns:Converters="clr-namespace:Pithos.Client.WPF.Converters" 
         x:Name="TheView"
-        Title="Pithos Preferences" Height="436" Width="600" 
+        Title="Pithos+ Preferences" Height="436" Width="600" 
         ShowInTaskbar="true"
         WindowStartupLocation="CenterScreen"
         Icon="/PithosPlus;component/Images/PithosTaskbar.png"
index f4ce957..ae41433 100644 (file)
@@ -109,7 +109,7 @@ namespace Pithos.Client.WPF.Preferences
         {
             // ReSharper disable DoNotCallOverridableMethodsInConstructor
             //Caliburn.Micro uses DisplayName for the view's title
-            DisplayName = "Pithos Preferences";
+            DisplayName = "Pithos+ Preferences";
             // ReSharper restore DoNotCallOverridableMethodsInConstructor
 
             _windowManager = windowManager;
index 0774900..db3175d 100644 (file)
@@ -48,11 +48,11 @@ using System.Windows;
 // General Information about an assembly is controlled through the following 
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyTitle("Pithos Client for Windows")]
-[assembly: AssemblyDescription("Pithos Client for Windows")]
+[assembly: AssemblyTitle("Pithos+ Client for Windows")]
+[assembly: AssemblyDescription("Pithos+ Client for Windows")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("GRNET")]
-[assembly: AssemblyProduct("Pithos Client for Windows")]
+[assembly: AssemblyProduct("Pithos+ Client for Windows")]
 [assembly: AssemblyCopyright("Copyright © GRNet 2011-2012")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
index 0f8e080..d326a36 100644 (file)
@@ -7,11 +7,13 @@
             <RowDefinition Height="Auto"/>
             <RowDefinition Height="Auto"/>
             <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
             <RowDefinition Height="*"/>
             <RowDefinition Height="Auto"/>
         </Grid.RowDefinitions>
         <Image Grid.Row="0" Source="/PithosPlus;component/Images/SmallLogo.png" />
-        <TextBlock Grid.Row="0" Text="Pithos " HorizontalAlignment="Center" FontSize="28" FontWeight="Bold" FontFamily="Segoe UI" Width="200" TextWrapping="WrapWithOverflow" TextAlignment="Center" VerticalAlignment="Center"/>
+        <TextBlock Grid.Row="0" Text="Pithos+ " HorizontalAlignment="Center" FontSize="28" FontWeight="Bold" FontFamily="Segoe UI" Width="200" TextWrapping="WrapWithOverflow" TextAlignment="Center" VerticalAlignment="Center"/>
         <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0">
             <TextBlock Text="Version" VerticalAlignment="Center"/>
             <TextBlock x:Name="Version" Text="0.0.0.0" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
             <TextBlock Text="Released" VerticalAlignment="Center"/>
             <TextBlock x:Name="Released" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
         </StackPanel>
-        <TextBlock Grid.Row="3" Margin="10,0">
+        <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="10,0">
+            <TextBlock Text="Latest Published Version" VerticalAlignment="Center"/>
+            <TextBlock x:Name="LatestVersion" Text="0.0.0.0" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
+        </StackPanel>
+        <TextBlock Grid.Row="4" Margin="10,0">
             <Run>Visit the </Run>
             <Hyperlink NavigateUri="http://code.grnet.gr/projects/pithos-ms-client" >Development Web Site</Hyperlink>
         </TextBlock>
-        <Button x:Name="CloseAbout" Content="OK" Grid.Row="4" HorizontalAlignment="Center" Width="75" Margin="5" />
+        <TextBlock Grid.Row="5" Margin="10,0" TextWrapping="Wrap">
+            <Bold>Support</Bold><LineBreak/>
+            For help visit the 
+            <Hyperlink NavigateUri="https://cms.okeanos.grnet.gr/services/pithos/" >Support Site</Hyperlink> or <LineBreak/>send an email to the 
+            <Hyperlink NavigateUri="email:support@okeanos.grnet.gr">Support Address</Hyperlink>
+        </TextBlock>
+        <Button x:Name="CloseAbout" Content="OK" Grid.Row="6" HorizontalAlignment="Center" Width="75" Margin="5" />
     </Grid>
 </Window>
index 21100fb..e0b74b7 100644 (file)
@@ -58,6 +58,9 @@ namespace Pithos.Client.WPF.Shell
     public class AboutViewModel:Screen
     {
         public string Version { get; set; }
+        
+        public string LatestVersion { get; set; }
+        public string LatestRelease { get; set; }
 
         public DateTime Released { get; set; }
 
index ea9c0a0..da0374d 100644 (file)
@@ -14,7 +14,7 @@
         </Grid.RowDefinitions>
 
         <StackPanel Grid.Row="0">
-            <TextBlock Text="Pithos is currently in alpha test and we would appreciate any kind of feedback. We welcome any suggestions, questions and bug reports you may have" TextWrapping="Wrap" Margin="5,10" />
+            <TextBlock Text="Pithos+ is currently in alpha test and we would appreciate any kind of feedback. We welcome any suggestions, questions and bug reports you may have" TextWrapping="Wrap" Margin="5,10" />
             <TextBlock Text="Please describe your problem here providing as many details as possible" Margin="5,10" FontWeight="Bold" TextWrapping="Wrap"/>
         </StackPanel>
         <TextBox x:Name="Message" Grid.Row="1" HorizontalAlignment="Stretch" TextWrapping="Wrap" AcceptsReturn="True" Height="100" />
index 3df10a9..fcefc09 100644 (file)
@@ -96,7 +96,7 @@ namespace Pithos.Client.WPF.Shell
 
             var builder = new StringBuilder();
             
-            builder.AppendLine("Pithos Windows Client")
+            builder.AppendLine("Pithos+ Windows Client")
                 .Append('-', 30)
                 .AppendLine()
                 .AppendFormat("Released: {0}\r\n", released)
@@ -114,7 +114,7 @@ namespace Pithos.Client.WPF.Shell
         
         public void Send()
         {
-            var message = "Pithos Windows Client Feedback:\r\n" +Message;
+            var message = "Pithos+ Windows Client Feedback:\r\n" +Message;
             var fields = new Dictionary<string, string> { { "feedback-msg", message }, { "feedback-data", Data } };
             string token="0007";
             if (Settings.Default.Accounts.Count>0)
index a67c513..c5b4f91 100644 (file)
@@ -2,7 +2,7 @@
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         
-        Title="Pithos Status" Height="100" Width="250" WindowStyle="ToolWindow" Topmost="True" Icon="/PithosPlus;component/Images/PithosTaskbar.png" WindowStartupLocation="CenterOwner">
+        Title="Pithos+ Status" Height="100" Width="250" WindowStyle="ToolWindow" Topmost="True" Icon="/PithosPlus;component/Images/PithosTaskbar.png" WindowStartupLocation="CenterOwner">
     <Border HorizontalAlignment="Stretch" 
             VerticalAlignment="Stretch" CornerRadius="2">
         <Grid>
index 715c273..c9e6ad4 100644 (file)
@@ -15,7 +15,7 @@ namespace Pithos.Client.WPF.Shell
         {
             get
             {
-                return "Pithos Status";
+                return "Pithos+ Status";
             }
             set
             {
index d235d10..2efd24d 100644 (file)
@@ -32,7 +32,7 @@
 
         <tb:TaskbarIcon x:Name="TaskbarView"                           
                         IconSource="{Binding StatusIcon}" 
-                        ToolTipText="{Binding StatusMessage}"                        
+                        ToolTipText="{Binding TooltipMessage}"                        
                         MenuActivation="LeftOrRightClick" 
                         DoubleClickCommand="{Binding OpenPithosFolderCommand}"                         
                         >
                         BorderBrush="Black" 
                         BorderThickness="1" 
                         CornerRadius="2">
-                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding StatusMessage}" Margin="5"></TextBlock>
+                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding TooltipMessage}" Margin="5"></TextBlock>
                 </Border>
             </tb:TaskbarIcon.TrayToolTip>
         </tb:TaskbarIcon>
index 175ce13..f44b57d 100644 (file)
@@ -122,9 +122,6 @@ namespace Pithos.Client.WPF {
                //Logging in the Pithos client is provided by log4net
         private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 
-               //Lazily initialized File Version info. This is done once and lazily to avoid blocking the UI
-               private readonly Lazy<FileVersionInfo> _fileVersion;
-
            private readonly PollAgent _pollAgent;
 
 
@@ -138,6 +135,11 @@ namespace Pithos.Client.WPF {
                {
                    _miniStatus = value;
                    _miniStatus.Shell = this;
+                   _miniStatus.Deactivated += (sender, arg) =>
+                                                  {
+                                                      _statusVisible = false;
+                                                   NotifyOfPropertyChange(()=>MiniStatusCaption);
+                                                  };
                }
            }
 
@@ -170,18 +172,16 @@ namespace Pithos.Client.WPF {
                     ? "No Accounts added. Please add an account" 
                     : "Starting";
 
-                               _fileVersion=  new Lazy<FileVersionInfo>(() =>
-                               {
-                                       Assembly assembly = Assembly.GetExecutingAssembly();
-                                       var fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);
-                                       return fileVersion;
-                               });
                                _accounts.CollectionChanged += (sender, e) =>
                                                                                                   {
                                                                                                           NotifyOfPropertyChange(() => OpenFolderCaption);
                                                                                                           NotifyOfPropertyChange(() => HasAccounts);
                                                                                                   };
 
+                Assembly assembly = Assembly.GetExecutingAssembly();
+                var fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);
+                VersionMessage = String.Format("Pithos+ {0}", fileVersion.FileVersion);
+
                        }
                        catch (Exception exc)
                        {
@@ -336,10 +336,22 @@ namespace Pithos.Client.WPF {
                        {
                                _statusMessage = value;
                                NotifyOfPropertyChange(() => StatusMessage);
+                NotifyOfPropertyChange(() => TooltipMessage);
                        }
                }
 
-               private readonly ObservableConcurrentCollection<AccountInfo> _accounts = new ObservableConcurrentCollection<AccountInfo>();
+        public string VersionMessage { get; set; }
+
+           private string _tooltipMessage;
+           public string TooltipMessage
+           {
+               get
+               {
+                   return String.Format("{0}\r\n{1}",VersionMessage,StatusMessage);
+               }
+           }
+
+           private readonly ObservableConcurrentCollection<AccountInfo> _accounts = new ObservableConcurrentCollection<AccountInfo>();
                public ObservableConcurrentCollection<AccountInfo> Accounts
                {
                        get { return _accounts; }
@@ -410,7 +422,8 @@ namespace Pithos.Client.WPF {
 
                public void AboutPithos()
                {
-                       var about = new AboutViewModel();
+                       var about = IoC.Get<AboutViewModel>();
+                   about.LatestVersion=_sparkle.LatestVersion;
                        _windowManager.ShowWindow(about);
                }
 
@@ -461,12 +474,13 @@ namespace Pithos.Client.WPF {
            }
 
            public void ShowMiniStatus()
-        {
+        {            
             if (!_statusVisible)
                 _windowManager.ShowWindow(MiniStatus);
             else
-            {
-                MiniStatus.TryClose();
+            {           
+                if (MiniStatus.IsActive)
+                    MiniStatus.TryClose();
             }
             _statusVisible=!_statusVisible;
 
@@ -761,7 +775,7 @@ namespace Pithos.Client.WPF {
                {
                        StatusMessage = status;
                        
-                       _events.Publish(new Notification { Title = "Pithos", Message = status, Level = level });
+                       _events.Publish(new Notification { Title = "Pithos+", Message = status, Level = level });
                }
 
                public void NotifyChangedFile(string filePath)
@@ -815,7 +829,7 @@ namespace Pithos.Client.WPF {
 
                        StatusMessage = message;
 
-                       _events.Publish(new Notification { Title = "Pithos", Message = message, Level = level});
+                       _events.Publish(new Notification { Title = "Pithos+", Message = message, Level = level});
                }
 
                public void Notify(Notification notification)
@@ -914,7 +928,7 @@ namespace Pithos.Client.WPF {
                                if (!_pollStarted) 
                                        return;
                                _pollStarted= false;
-                               notification.Title = "Pithos";
+                               notification.Title = "Pithos+";
                                notification.Message = "Start Synchronisation";
                        }
 
@@ -926,10 +940,11 @@ namespace Pithos.Client.WPF {
             }
 
                    var progress = notification as ProgressNotification;
-                   if (progress != null)
+                   
+                   
+            if (progress != null)
                    {
-                       StatusMessage = String.Format("Pithos {0}\r\n{1} {2:p2} of {3} - {4}",
-                                                     _fileVersion.Value.FileVersion, 
+                       StatusMessage = String.Format("{0} {1:p2} of {2} - {3}",                                                      
                                               progress.Action,
                                                      progress.Block/(double)progress.TotalBlocks,
                                                      progress.FileSize.ToByteSize(),
@@ -940,9 +955,7 @@ namespace Pithos.Client.WPF {
                    var info = notification as StatusNotification;
             if (info != null)
             {
-                StatusMessage = String.Format("Pithos {0}\r\n{1}",
-                                              _fileVersion.Value.FileVersion,
-                                              info.Title);
+                StatusMessage = info.Title;
                 return;
             }
                        if (String.IsNullOrWhiteSpace(notification.Message) && String.IsNullOrWhiteSpace(notification.Title))
index 7a27647..7ffa5e7 100644 (file)
@@ -182,7 +182,7 @@ namespace Pithos.Core.Test
             var batch = new FileEventIdleBatch(100, dict => events = dict);
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Created, "path1", "file1"));
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Changed, "path1", "file1"));
-            batch.Post(new RenamedEventArgs(WatcherChangeTypes.Renamed, "path1", "file2", "file1"));
+            batch.Post(new MovedEventArgs("path1", "file2", "path1", "file1"));
             Thread.Sleep(500);
 
             Assert.That(events.ContainsKey("path1\\file1"), Is.False);
@@ -199,7 +199,7 @@ namespace Pithos.Core.Test
             Dictionary<string, FileSystemEventArgs[]> events = null;
             var batch = new FileEventIdleBatch(100, dict => events = dict);
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Changed, "path1", "file1"));
-            batch.Post(new RenamedEventArgs(WatcherChangeTypes.Renamed, "path1", "file2","file1"));
+            batch.Post(new MovedEventArgs("path1", "file2","path1","file1"));
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Changed, "path1", "file2"));
             Thread.Sleep(500);
 
@@ -213,7 +213,7 @@ namespace Pithos.Core.Test
             Dictionary<string, FileSystemEventArgs[]> events = null;
             var batch = new FileEventIdleBatch(100, dict => events = dict);
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Created, "path1", "file1"));
-            batch.Post(new RenamedEventArgs(WatcherChangeTypes.Renamed, "path1", "file2","file1"));
+            batch.Post(new MovedEventArgs("path1", "file2", "path1", "file1"));
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Changed, "path1", "file2"));
             Thread.Sleep(500);
 
@@ -232,7 +232,7 @@ namespace Pithos.Core.Test
             Dictionary<string, FileSystemEventArgs[]> events = null;
             var batch = new FileEventIdleBatch(100, dict => events = dict);
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Created, "path1", "file1"));
-            batch.Post(new RenamedEventArgs(WatcherChangeTypes.Renamed, "path1", "file2","file1"));
+            batch.Post(new MovedEventArgs("path1", "file2", "path1", "file1"));
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Changed, "path1", "file2"));
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Deleted, "path1", "file2"));
             Thread.Sleep(500);
@@ -250,7 +250,7 @@ namespace Pithos.Core.Test
             
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Created, "path1", "file1"));
             batch.Post(new FileSystemEventArgs(WatcherChangeTypes.Changed, "path1", "file1"));
-            batch.Post(new RenamedEventArgs(WatcherChangeTypes.Renamed, "path1", "file3","file2"));
+            batch.Post(new MovedEventArgs("path1", "file3", "path1", "file2"));
             Thread.Sleep(500);
             
 
index 8b5c612..0ffe721 100644 (file)
@@ -93,14 +93,14 @@ namespace Pithos.Core.Agents
                 {
                     if (change.ChangeType == WatcherChangeTypes.Renamed)
                     {
-                        var rename = (RenamedEventArgs) change;
+                        var rename = (MovedEventArgs) change;
                         _agent.Post(new WorkflowState
                                         {
                                             AccountInfo = AccountInfo,
                                             OldPath = rename.OldFullPath,
-                                            OldFileName = rename.OldName,
+                                            OldFileName = Path.GetFileName(rename.OldName),
                                             Path = rename.FullPath,
-                                            FileName = rename.Name,
+                                            FileName = Path.GetFileName(rename.Name),
                                             TriggeringChange = rename.ChangeType
                                         });
                     }
@@ -109,7 +109,7 @@ namespace Pithos.Core.Agents
                         {
                             AccountInfo = AccountInfo,
                             Path = change.FullPath,
-                            FileName = change.Name,
+                            FileName = Path.GetFileName(change.Name),
                             TriggeringChange = change.ChangeType
                         });                        
                 }
index dd12917..8da3a31 100644 (file)
@@ -41,6 +41,7 @@
 #endregion
 using System;
 using System.Collections.Generic;
+using System.Diagnostics.Contracts;
 using System.IO;
 using System.Linq;
 using System.Reflection;
@@ -71,6 +72,9 @@ namespace Pithos.Core.Agents
 
         public void Post(FileSystemEventArgs arg)
         {
+            if (arg is RenamedEventArgs)
+                throw new ArgumentException("arg");
+            Contract.EndContractBlock();
             if (Log.IsDebugEnabled)
                 Log.DebugFormat("Batch Post  {0}:{1}", arg.ChangeType.ToString("g"), arg.FullPath);
 
@@ -93,7 +97,7 @@ namespace Pithos.Core.Agents
                     dict[arg.FullPath] = new[] { arg };
                 else if (arg.ChangeType == WatcherChangeTypes.Renamed)
                 {
-                    var renamedArg = (RenamedEventArgs)arg;
+                    var renamedArg = (MovedEventArgs)arg;
                     FileSystemEventArgs[] oldValue;
                     if (dict.TryGetValue(renamedArg.OldFullPath, out oldValue))
                     {
index faef74d..5c25207 100644 (file)
@@ -91,8 +91,8 @@ namespace Pithos.Core.Agents
             get { return _cachedDeletedFullPath; }\r
             set\r
             {\r
-                Debug.Assert(Path.IsPathRooted(CachedDeletedFullPath));\r
-                if (!Path.IsPathRooted(CachedDeletedFullPath))\r
+                Debug.Assert(Path.IsPathRooted(value));\r
+                if (!Path.IsPathRooted(value))\r
                     Log.WarnFormat("Storing a relative CachedDeletedFullPath: {0}",value);\r
                 _cachedDeletedFullPath = value;\r
             }\r
@@ -178,7 +178,7 @@ namespace Pithos.Core.Agents
                     try\r
                     {\r
 \r
-                        Moved(sender, new MovedEventArgs(e.FullPath,e.Name,e.OldFullPath,e.OldName));\r
+                        Moved(sender, new MovedEventArgs(Path.GetDirectoryName(e.FullPath),Path.GetFileName(e.Name),Path.GetDirectoryName(e.OldFullPath),Path.GetFileName(e.OldName)));\r
                     }\r
                     catch (Exception exc)\r
                     {\r
index 3328730..9596516 100644 (file)
@@ -864,6 +864,8 @@ namespace Pithos.Core.Agents
                         catch (WebException exc)
                         {
                             var response=(exc.Response as HttpWebResponse);
+                            if (response == null)
+                                throw;
                             if (response.StatusCode == HttpStatusCode.Forbidden)
                             {
                                 StatusKeeper.SetFileState(fileInfo.FullName,FileStatus.Forbidden, FileOverlayStatus.Conflict);