Skip to content

Fix crash when comparing two directories

When comparing two directories, either from the command line or from the UI kdiff 3 would crash. This is caused by two things:

First, no mJobHandler is constructed in the FileAccess::setFile function taking a QUrl causing it to be nullptr when trying to list the directory contents.

Second, since the FileAccess::mJobHandler is a raw pointer and manually memory managed by the FileAccess class we cannot rely on the compiler generated copy/assignment constructor or move/assignment constructors, but have to provide our own that correctly takes care of the raw pointer.

Merge request reports