Skip to content

Commit

Permalink
removing cleanupDocument feature at least one other scenario has been…
Browse files Browse the repository at this point in the history
… found where newly inserted document is deleted right after, when plasce on a network-storage context and with a samba client using the cache=loose option. cleanupDocument will be reintroduced with a setting, making it easier to enable/disable, until it behaves correctly on every context
  • Loading branch information
kaamui committed Feb 2, 2024
1 parent 6b27e9a commit 993bb2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/UBPersistenceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ void UBPersistenceManager::persistDocumentScene(std::shared_ptr<UBDocumentProxy>

std::shared_ptr<UBDocumentProxy> UBPersistenceManager::persistDocumentMetadata(std::shared_ptr<UBDocumentProxy> pDocumentProxy, bool forceImmediateSaving)
{
cleanupDocument(pDocumentProxy);
//cleanupDocument(pDocumentProxy);

if (forceImmediateSaving)
{
Expand Down Expand Up @@ -1567,12 +1567,12 @@ void UBPersistenceManager::cleanupDocument(std::shared_ptr<UBDocumentProxy> pDoc
// unreferenced file or directory
if (entry.isDir())
{
qDebug() << "Deleting unreferenced directory" << filename;
qWarning() << "Deleting unreferenced directory" << filename;
UBFileSystemUtils::deleteDir(absoluteFilePath);
}
else
{
qDebug() << "Deleting unreferenced file" << filename;
qWarning() << "Deleting unreferenced file" << filename;
UBFileSystemUtils::deleteFile(absoluteFilePath);
}
}
Expand Down

0 comments on commit 993bb2f

Please sign in to comment.