@@ -136,7 +136,8 @@ void cfApiSendPlaceholdersTransferInfo(const CF_CONNECTION_KEY &connectionKey,
136
136
NTSTATUS status,
137
137
const QList<OCC::PlaceholderCreateInfo> &newEntries,
138
138
qint64 currentPlaceholdersCount,
139
- qint64 totalPlaceholdersCount)
139
+ qint64 totalPlaceholdersCount,
140
+ const QString &serverPath)
140
141
{
141
142
CF_OPERATION_INFO opInfo = { 0 };
142
143
CF_OPERATION_PARAMETERS opParams = { 0 };
@@ -147,6 +148,7 @@ void cfApiSendPlaceholdersTransferInfo(const CF_CONNECTION_KEY &connectionKey,
147
148
const auto &entryInfo = newEntries[i];
148
149
auto &newPlaceholder = newPlaceholders[i];
149
150
151
+ const auto entryFileName = entryInfo.name .mid (serverPath.length ());
150
152
const auto &fileId = entryInfo.properties [QStringLiteral (" fileid" )];
151
153
const auto fileSize = entryInfo.properties [QStringLiteral (" size" )].toULongLong ();
152
154
auto fileMtimeString = entryInfo.properties [QStringLiteral (" getlastmodified" )];
@@ -156,7 +158,7 @@ void cfApiSendPlaceholdersTransferInfo(const CF_CONNECTION_KEY &connectionKey,
156
158
const auto &fileResourceType = entryInfo.properties [QStringLiteral (" resourcetype" )];
157
159
const auto isDir = QStringLiteral (" <collection></collection>" ) == fileResourceType;
158
160
159
- qCInfo (lcCfApiWrapper ()) << entryInfo. name
161
+ qCInfo (lcCfApiWrapper ()) << entryFileName
160
162
<< " fileId:" << fileId
161
163
<< " fileSize:" << fileSize
162
164
<< " fileMtime:" << fileMtime
@@ -523,16 +525,18 @@ void CALLBACK cfApiFetchPlaceHolders(const CF_CALLBACK_INFO *callbackInfo, const
523
525
STATUS_UNSUCCESSFUL,
524
526
{},
525
527
0 ,
526
- 0 );
528
+ 0 ,
529
+ {});
527
530
};
528
531
529
- const auto sendTransferInfo = [=](const QList<OCC::PlaceholderCreateInfo> &newEntries) {
532
+ const auto sendTransferInfo = [=](const QList<OCC::PlaceholderCreateInfo> &newEntries, const QString &serverPath ) {
530
533
cfApiSendPlaceholdersTransferInfo (callbackInfo->ConnectionKey ,
531
534
callbackInfo->TransferKey ,
532
535
STATUS_SUCCESS,
533
536
newEntries,
534
537
newEntries.size (),
535
- newEntries.size ());
538
+ newEntries.size (),
539
+ serverPath);
536
540
};
537
541
538
542
auto vfs = reinterpret_cast <OCC::VfsCfApi *>(callbackInfo->CallbackContext );
@@ -593,21 +597,23 @@ void CALLBACK cfApiFetchPlaceHolders(const CF_CALLBACK_INFO *callbackInfo, const
593
597
594
598
qCInfo (lcCfApiWrapper ()) << " ls prop finished" << path << serverPath << " discovered new entries:" << newEntries.size ();
595
599
596
- sendTransferInfo (newEntries);
600
+ sendTransferInfo (newEntries, serverPath );
597
601
598
602
auto newPlaceholdersResult = 0 ;
599
603
const auto invokeFinalizeResult = QMetaObject::invokeMethod (vfs,
600
- [&newPlaceholdersResult, vfs, &newEntries, &serverPath] { return vfs->finalizeNewPlaceholders (newEntries, serverPath); },
604
+ [&newPlaceholdersResult, vfs, &newEntries, &serverPath] () -> int { return vfs->finalizeNewPlaceholders (newEntries, serverPath); },
601
605
Qt::BlockingQueuedConnection,
602
- & newPlaceholdersResult);
606
+ qReturnArg ( newPlaceholdersResult) );
603
607
if (!invokeFinalizeResult) {
604
608
qCritical (lcCfApiWrapper) << " Failed to finalize hydration job for" << path << requestId;
605
609
sendTransferError ();
606
610
}
611
+ qCInfo (lcCfApiWrapper) << " call for finalizeNewPlaceholders was done" ;
607
612
608
613
if (!newPlaceholdersResult) {
609
614
sendTransferError ();
610
615
}
616
+ qCInfo (lcCfApiWrapper) << " call for finalizeNewPlaceholders succeeded" ;
611
617
}
612
618
613
619
void CALLBACK cfApiNotifyFileCloseCompletion (const CF_CALLBACK_INFO *callbackInfo, const CF_CALLBACK_PARAMETERS * /* callbackParameters*/ )
0 commit comments