/[AnywhereTS-MSSQL]/trunk/Tools/ATSClientManager/ATSClientManager/ATSClientFilesCollection.cs
ViewVC logotype

Diff of /trunk/Tools/ATSClientManager/ATSClientManager/ATSClientFilesCollection.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/Tools/ATSClientManager/ATSClientManager/ATSClientFilesCollection.cs	2012/08/28 00:34:23	348
+++ trunk/Tools/ATSClientManager/ATSClientManager/ATSClientFilesCollection.cs	2012/08/28 00:46:49	349
@@ -13,9 +13,9 @@
         {
             collection = new Dictionary<ATSClientFileTypes, string>
             {
-                {ATSClientFileTypes.ClientFileSystem, "initrd"},
-                {ATSClientFileTypes.ClientConfig, "network"},
-                {ATSClientFileTypes.ClientBootKernel, "vmlinuz"},
+                {ATSClientFileTypes.ClientFileSystem, @"\initrd"},
+                {ATSClientFileTypes.ClientConfig, @"\squashfs-root\defaults"},
+                {ATSClientFileTypes.ClientBootKernel, @"\vmlinuz"},
             };
         }
 
@@ -47,10 +47,11 @@
         {
             ATSClientFileList list = new ATSClientFileList();
             List<IATSClientFile> client_files = new List<IATSClientFile>();
-            List<FileInfo> files = new List<FileInfo>(path.GetFiles());            
+            List<FileInfo> files = new List<FileInfo>(path.GetFiles("*.*",SearchOption.AllDirectories));            
             foreach (var file in files)
             {
-                ATSClientFileTypes type = GetClientFileTypeByName(file.Name);
+                ATSClientFileTypes type = GetClientFileTypeByName(file.FullName.Replace(path.FullName, ""));
+                if(type != ATSClientFileTypes.ClientUnknown)
                 client_files.Add(ATSClientFile.Create(type, file.FullName));
             }
             list = new ATSClientFileList(client_files);
@@ -60,6 +61,5 @@
         {
             return GetClientFilesInPath(new DirectoryInfo(path));
         }
-
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22