mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
parent
b56b5bc29d
commit
6cb5c7a104
2 changed files with 7 additions and 5 deletions
|
@ -126,9 +126,12 @@ std::string Uri::extension () const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Uri::is_directory () const
|
||||
{
|
||||
return (path == ".")
|
||||
|| (path == "")
|
||||
|| (path[path.length()-1] == '/');
|
||||
if (is_local ())
|
||||
return Path (this->data).is_directory ();
|
||||
else
|
||||
return (path == ".")
|
||||
|| (path == "")
|
||||
|| (path[path.length()-1] == '/');
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -716,8 +716,7 @@ void handlePull (std::string& outs)
|
|||
{
|
||||
Directory location (context.config.get ("data.location"));
|
||||
|
||||
if (! uri.append ("{pending,undo,completed}.data") ||
|
||||
! Path (uri.data).is_directory ())
|
||||
if (! uri.append ("{pending,undo,completed}.data"))
|
||||
throw std::string ("The uri '") + uri.path + "' is not a local directory.";
|
||||
|
||||
Transport* transport;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue