File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -452,6 +452,7 @@ void EditLocallyJob::startEditLocally()
452452 });
453453 _folderForFile->setSilenceErrorsUntilNextSync (true );
454454 _folderForFile->slotTerminateSync ();
455+ _shouldScheduleFolderSyncAfterFileIsOpened = true ;
455456
456457 return ;
457458 }
@@ -538,6 +539,8 @@ void EditLocallyJob::slotItemDiscovered(const OCC::SyncFileItemPtr &item)
538539
539540void EditLocallyJob::openFile ()
540541{
542+ Q_ASSERT (_folderForFile);
543+
541544 if (_localFilePath.isEmpty ()) {
542545 qCWarning (lcEditLocallyJob) << " Could not edit locally. Invalid local file path." ;
543546 return ;
@@ -553,6 +556,11 @@ void EditLocallyJob::openFile()
553556 }
554557
555558 Systray::instance ()->destroyEditFileLocallyLoadingDialog ();
559+
560+ if (_shouldScheduleFolderSyncAfterFileIsOpened) {
561+ _folderForFile->startSync ();
562+ }
563+
556564 emit finished ();
557565 });
558566}
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ private slots:
9292
9393 bool _tokenVerified = false ;
9494
95+ bool _shouldScheduleFolderSyncAfterFileIsOpened = false ;
96+
9597 AccountStatePtr _accountState;
9698 QString _userId;
9799 QString _relPath; // full remote path for a file (as on the server)
You can’t perform that action at this time.
0 commit comments