@@ -126,9 +126,12 @@ std::string Uri::extension () const
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Uri::is_directory () const
|
bool Uri::is_directory () const
|
||||||
{
|
{
|
||||||
return (path == ".")
|
if (is_local ())
|
||||||
|| (path == "")
|
return Path (this->data).is_directory ();
|
||||||
|| (path[path.length()-1] == '/');
|
else
|
||||||
|
return (path == ".")
|
||||||
|
|| (path == "")
|
||||||
|
|| (path[path.length()-1] == '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -716,8 +716,7 @@ void handlePull (std::string& outs)
|
|||||||
{
|
{
|
||||||
Directory location (context.config.get ("data.location"));
|
Directory location (context.config.get ("data.location"));
|
||||||
|
|
||||||
if (! uri.append ("{pending,undo,completed}.data") ||
|
if (! uri.append ("{pending,undo,completed}.data"))
|
||||||
! Path (uri.data).is_directory ())
|
|
||||||
throw std::string ("The uri '") + uri.path + "' is not a local directory.";
|
throw std::string ("The uri '") + uri.path + "' is not a local directory.";
|
||||||
|
|
||||||
Transport* transport;
|
Transport* transport;
|
||||||
|
|||||||
Reference in New Issue
Block a user