Revision 79736291

b/trunk/Pithos.Client.WPF/Properties/Settings.Designer.cs
226 226
                this["Accounts"] = value;
227 227
            }
228 228
        }
229
        
230
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
231
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
232
        [global::System.Configuration.DefaultSettingValueAttribute("https://pithos.dev.grnet.gr")]
233
        public string PithosAuthenticationUrl {
234
            get {
235
                return ((string)(this["PithosAuthenticationUrl"]));
236
            }
237
        }
238
        
239
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
240
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
241
        [global::System.Configuration.DefaultSettingValueAttribute("https://auth.api.rackspacecloud.com")]
242
        public string CloudfilesAuthenticationUrl {
243
            get {
244
                return ((string)(this["CloudfilesAuthenticationUrl"]));
245
            }
246
        }
229 247
    }
230 248
}
b/trunk/Pithos.Client.WPF/Properties/Settings.settings
58 58
          </ArrayOfAccountSettings>
59 59
        </Value>
60 60
    </Setting>
61
    <Setting Name="PithosAuthenticationUrl" Type="System.String" Scope="Application">
62
      <Value Profile="(Default)">https://pithos.dev.grnet.gr</Value>
63
    </Setting>
64
    <Setting Name="CloudfilesAuthenticationUrl" Type="System.String" Scope="Application">
65
      <Value Profile="(Default)">https://auth.api.rackspacecloud.com</Value>
66
    </Setting>
61 67
  </Settings>
62 68
</SettingsFile>
b/trunk/Pithos.Client.WPF/TaskbarViewModel.cs
48 48
                Monitor.UserName = account.AccountName;
49 49
                Monitor.ApiKey = account.ApiKey;
50 50
                Monitor.UsePithos = account.UsePithos;
51
                var appSettings = Properties.Settings.Default;
52
                Monitor.AuthenticationUrl = account.UsePithos
53
                                                ? appSettings.PithosAuthenticationUrl
54
                                                : appSettings.CloudfilesAuthenticationUrl;
51 55
                Monitor.RootPath = Path.Combine(Settings.PithosPath, account.RootPath??"");
52 56
            }
53 57

  
b/trunk/Pithos.Client.WPF/app.config
90 90
      <setting name="PithosSite" serializeAs="String">
91 91
        <value>http://pithos.dev.grnet.gr/pithos.html</value>
92 92
      </setting>
93
      <setting name="PithosAuthenticationUrl" serializeAs="String">
94
        <value>https://pithos.dev.grnet.gr</value>
95
      </setting>
96
      <setting name="CloudfilesAuthenticationUrl" serializeAs="String">
97
        <value>https://auth.api.rackspacecloud.com</value>
98
      </setting>
93 99
    </Pithos.Client.WPF.Properties.Settings>
94 100
  </applicationSettings>
95 101
</configuration>
b/trunk/Pithos.Core/PithosMonitor.cs
101 101
        private void EnsurePithosContainers()
102 102
        {
103 103
            CloudClient.UsePithos = this.UsePithos;
104
            CloudClient.AuthenticationUrl = this.AuthenticationUrl;
104 105
            CloudClient.Authenticate(UserName, ApiKey);
105 106

  
106 107
            var pithosContainers = new[] {PithosContainer, TrashContainer};
......
111 112
            }
112 113
        }
113 114

  
115
        public string AuthenticationUrl { get; set; }
116

  
114 117
        private Uri ProxyFromSettings()
115 118
        {            
116 119
            if (Settings.UseManualProxy)
......
224 227
            try
225 228
            {
226 229
                CloudClient.UsePithos = this.UsePithos;
230
                CloudClient.AuthenticationUrl = this.AuthenticationUrl;
227 231
                CloudClient.Authenticate(UserName, ApiKey);
228 232

  
229 233
                StartListening(RootPath);
......
493 497
        {
494 498
            if (state.Skip)
495 499
                return state;
496
            string path = state.Path;
500
            string path = state.Path.ToLower();            
497 501
            string fileName = Path.GetFileName(path);
498 502

  
503
            //Bypass deleted files, unless the status is Deleted
504
            if (!(File.Exists(path) || state.Status == FileStatus.Deleted))
505
            {
506
                state.Skip = true;
507
                this.StatusKeeper.RemoveFileOverlayStatus(path);
508
                return state;
509
            }
510

  
499 511
            switch(state.Status)
500 512
            {
501 513
                case FileStatus.Created:
b/trunk/Pithos.Interfaces/ICloudClient.cs
19 19
        Uri Proxy { get; set; }
20 20
        double DownloadPercentLimit { get; set; }
21 21
        double UploadPercentLimit { get; set; }
22
        string AuthenticationUrl { get; set; }
23

  
22 24

  
23
        
24 25
        IList<ContainerInfo> ListContainers();
25 26
        IList<ObjectInfo> ListObjects(string container);
26 27
        IList<ObjectInfo> ListObjects(string container, string folder); 
......
52 53
        public double DownloadPercentLimit { get; set; }
53 54
        public double UploadPercentLimit { get; set; }
54 55

  
56
        public string AuthenticationUrl { get; set; }
57

  
55 58
        public bool UsePithos { get; set; }
56 59

  
57 60
        public void Authenticate(string userName, string apiKey)
b/trunk/Pithos.Network/CloudFilesClient.cs
23 23
    [Export(typeof(ICloudClient))]
24 24
    public class CloudFilesClient:ICloudClient
25 25
    {
26
        string _rackSpaceAuthUrl = "https://auth.api.rackspacecloud.com";
27
        private string _pithosAuthUrl = "https://pithos.dev.grnet.gr";
28 26

  
29 27
        private RestClient _client;
30 28
        private readonly TimeSpan _shortTimeout = TimeSpan.FromSeconds(10);
......
38 36

  
39 37
        public double DownloadPercentLimit { get; set; }
40 38
        public double UploadPercentLimit { get; set; }
41
        
42
        public string AuthUrl
43
        {
44
            get { return UsePithos ? _pithosAuthUrl : _rackSpaceAuthUrl; }
45
        }
39

  
40
        public string AuthenticationUrl { get; set; }
41

  
46 42
 
47 43
        public string VersionPath
48 44
        {
......
71 67
            if (UsePithos)
72 68
            {
73 69
                Token = ApiKey;
74
                string storageUrl = String.Format("{0}/{1}/{2}", AuthUrl, VersionPath, UserName);
70
                string storageUrl = String.Format("{0}/{1}/{2}", AuthenticationUrl, VersionPath, UserName);
75 71
                StorageUrl = new Uri(storageUrl);
76 72
            }
77 73
            else
78 74
            {
79 75

  
80
                string authUrl = String.Format("{0}/{1}", AuthUrl, VersionPath);
76
                string authUrl = String.Format("{0}/{1}", AuthenticationUrl, VersionPath);
81 77
                var authClient = new RestClient {Path = authUrl, Proxy = proxy};                
82 78

  
83 79
                authClient.AddHeader("X-Auth-User", UserName);
b/trunk/Pithos.Setup.x64/Pithos.Setup.x64.vdproj
1494 1494
        "Name" = "8:Microsoft Visual Studio"
1495 1495
        "ProductName" = "8:Pithos"
1496 1496
        "ProductCode" = "8:{6DF108D9-D8FB-4438-9B83-A06A272FF56D}"
1497
        "PackageCode" = "8:{9A7D1522-2F63-4DCE-B974-6185A1FC6DA4}"
1497
        "PackageCode" = "8:{FE169482-E9D7-4D7B-BD3D-0101348C3EBF}"
1498 1498
        "UpgradeCode" = "8:{9D7BB283-458F-4124-A847-E42AFC9D5514}"
1499 1499
        "AspNetVersion" = "8:4.0.30319.0"
1500 1500
        "RestartWWWService" = "11:FALSE"
b/trunk/Pithos.sln
198 198
		{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Test|Mixed Platforms.Build.0 = Test|Any CPU
199 199
		{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Test|x86.ActiveCfg = Test|Any CPU
200 200
		{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
201
		{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
201 202
		{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
202 203
		{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
203 204
		{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|x86.ActiveCfg = Debug|Any CPU
......
243 244
		{B633FE8C-B40E-4122-A763-F94C8B1A70F8}.Test|Mixed Platforms.Build.0 = Release|Any CPU
244 245
		{B633FE8C-B40E-4122-A763-F94C8B1A70F8}.Test|x86.ActiveCfg = Release|Any CPU
245 246
		{C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Any CPU.ActiveCfg = Debug
247
		{C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Any CPU.Build.0 = Debug
246 248
		{C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Mixed Platforms.ActiveCfg = Debug
247 249
		{C6251981-3C49-404B-BB5B-9732887388D2}.Debug|x86.ActiveCfg = Debug
248 250
		{C6251981-3C49-404B-BB5B-9732887388D2}.Release|Any CPU.ActiveCfg = Release

Also available in: Unified diff