@@ -101,7 +101,9 @@ static time_t FileTimeToUnixTime(FILETIME *filetime, DWORD *remainder)
101101 }
102102}
103103
104- std::unique_ptr<csync_file_stat_t > csync_vio_local_readdir (csync_vio_handle_t *handle, OCC::Vfs *vfs) {
104+ std::unique_ptr<csync_file_stat_t > csync_vio_local_readdir (csync_vio_handle_t *handle, OCC::Vfs *vfs, bool checkPermissionsValidity)
105+ {
106+ Q_UNUSED (checkPermissionsValidity)
105107
106108 std::unique_ptr<csync_file_stat_t > file_stat;
107109 DWORD rem = 0 ;
@@ -125,7 +127,7 @@ std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *h
125127 }
126128 auto path = QString::fromWCharArray (handle->ffd .cFileName );
127129 if (path == QLatin1String (" ." ) || path == QLatin1String (" .." ))
128- return csync_vio_local_readdir (handle, vfs);
130+ return csync_vio_local_readdir (handle, vfs, true );
129131
130132 file_stat = std::make_unique<csync_file_stat_t >();
131133 file_stat->path = path.toUtf8 ();
@@ -170,16 +172,18 @@ std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *h
170172
171173 // path always ends with '\', by construction
172174
173- if (csync_vio_local_stat (handle->path + QString::fromWCharArray (handle->ffd .cFileName ), file_stat.get ()) < 0 ) {
175+ if (csync_vio_local_stat (handle->path + QString::fromWCharArray (handle->ffd .cFileName ), file_stat.get (), true ) < 0 ) {
174176 // Will get excluded by _csync_detect_update.
175177 file_stat->type = ItemTypeSkip;
176178 }
177179
178180 return file_stat;
179181}
180182
181- int csync_vio_local_stat (const QString &uri, csync_file_stat_t *buf)
183+ int csync_vio_local_stat (const QString &uri, csync_file_stat_t *buf, bool checkPermissionsValidity )
182184{
185+ Q_UNUSED (checkPermissionsValidity)
186+
183187 /* Almost nothing to do since csync_vio_local_readdir already filled up most of the information
184188 But we still need to fetch the file ID.
185189 Possible optimisation: only fetch the file id when we need it (for new files)
0 commit comments