8 |
|
|
9 |
|
#include "Share.hpp" |
10 |
|
|
11 |
< |
Share::Share(const _H<dbi::Connection>& connection, const api::Address& host, const cse::String& share) : connection(connection), host(host), share(share) |
11 |
> |
Share::Share(const _P<dbi::Connection>& connection, const api::Address& host, const cse::String& share) : connection(connection), host(host), share(share) |
12 |
|
{ |
13 |
|
api::Path shares(_B("Shares")); |
14 |
|
|
15 |
|
if (!shares.Exists()) |
16 |
|
shares.CreateDirectory(); |
17 |
|
|
18 |
< |
api::Path host_(shares.GetRealPath().GetChild(/*lexical_cast<cse::String>(host)*/_B("192.168.1.8"))); |
18 |
> |
cse::String address, port; |
19 |
> |
|
20 |
> |
host.ToString(address, port); |
21 |
> |
|
22 |
> |
api::Path host_(shares.GetRealPath().GetChild(address)); |
23 |
|
|
24 |
|
if (!host_.Exists()) |
25 |
|
host_.CreateDirectory(); |