diff OrthancServer/main.cpp @ 201:bee20e978835

refactoring of delete
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Nov 2012 17:36:19 +0100
parents 8e673a65564d
children 96b7918a6a18
line wrap: on
line diff
--- a/OrthancServer/main.cpp	Tue Nov 27 16:49:22 2012 +0100
+++ b/OrthancServer/main.cpp	Tue Nov 27 17:36:19 2012 +0100
@@ -217,9 +217,10 @@
       OrthancInitialize();
     }
 
-    std::string storageDirectory = GetGlobalStringParameter("StorageDirectory", "OrthancStorage");
-    ServerIndex index(storageDirectory);
-    MyDicomStoreFactory storeScp(index, storageDirectory);
+    boost::filesystem::path storageDirectory = GetGlobalStringParameter("StorageDirectory", "OrthancStorage");
+    FileStorage storage(storageDirectory.string());
+    ServerIndex index(storage, storageDirectory.string());
+    MyDicomStoreFactory storeScp(index, storageDirectory.string());
 
     {
       // DICOM server
@@ -257,7 +258,7 @@
       httpServer.RegisterHandler(new FilesystemHttpHandler("/app", ORTHANC_PATH "/OrthancExplorer"));
 #endif
 
-      httpServer.RegisterHandler(new OrthancRestApi(index, storageDirectory));
+      httpServer.RegisterHandler(new OrthancRestApi(index, storageDirectory.string()));
 
       // GO !!!
       httpServer.Start();