Skip to content

TDirectory.isEmpty hangs up if directory is not empty

Summary

TDirectory.isEmpty hangs up if directory is not empty

System Information

  • Operating system: Alt.Linux 10.4 KDE
  • Processor architecture: x86-64
  • Compiler version: 3.2.2
  • Device: Computer

Example Project

example.zip

Steps to reproduce

Refer to example project attached above, click the buttons. The error is related to an incorrect expression in the loop exit condition: image

What is the current bug behavior?

TDirectory.IsEmpty will hang up if directory is not empty.

What is the expected (correct) behavior?

The function should not hangs up

Possible fixes

Suggested solution: 10.fpc_tdirectory.isempty.patch

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information