parent
34e766498f
commit
a4585d81a6
|
@ -678,21 +678,18 @@ void EventHandler::updateItems(vector<WebDAVItem> &items)
|
||||||
{
|
{
|
||||||
item.state = _sqllite.getState(item.path);
|
item.state = _sqllite.getState(item.path);
|
||||||
|
|
||||||
if (iv_access(item.localPath.c_str(), W_OK) == 0)
|
if (item.type == Itemtype::IFILE)
|
||||||
{
|
{
|
||||||
|
if(iv_access(item.localPath.c_str(), W_OK) != 0)
|
||||||
|
item.state = FileState::ICLOUD;
|
||||||
|
else
|
||||||
item.state = FileState::ISYNCED;
|
item.state = FileState::ISYNCED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(item.type == Itemtype::IFOLDER)
|
if(iv_access(item.localPath.c_str(), W_OK) != 0)
|
||||||
{
|
|
||||||
iv_mkdir(item.localPath.c_str(), 0777);
|
iv_mkdir(item.localPath.c_str(), 0777);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
item.state = FileState::ICLOUD;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_sqllite.getEtag(item.path).compare(item.etag) != 0)
|
if (_sqllite.getEtag(item.path).compare(item.etag) != 0)
|
||||||
item.state = (item.state == FileState::ISYNCED) ? FileState::IOUTSYNCED : FileState::ICLOUD;
|
item.state = (item.state == FileState::ISYNCED) ? FileState::IOUTSYNCED : FileState::ICLOUD;
|
||||||
|
|
Loading…
Reference in New Issue