Fix crash on folder import

Fixes #624
1 job for master in 9 minutes and 14 seconds (queued for 8 minutes and 47 seconds)
Status Job ID Name Coverage
  Build
passed #41956
linux kf5-qt5 qt5.12

00:09:14

0.0%