According to Dropbox (via Hacker News), the company discovered the bug in the older versions of the Dropbox client on the basis of reports from users saying that they couldn't locate certain files after they turned on the Selective Sync feature.
Dropbox claims that the bug has only affected a small number of users and company has patched the desktop client along with retiring all affected versions of the desktop app. The company has even restored some of the deleted files, and is giving affected users a personalised web page with a list of deleted files and their restored versions, as shared by Dropbox user on Google+ on Saturday.
"We're very sorry about what happened. There's nothing more important to us than making sure your information is safe and always available. Our team has fixed the issue and put additional tests in place to prevent this from happening in the future," wrote Dropbox in its apology mail.Last month, Dropbox had temporarily suspended the automatic backup of photos and videos for users who had upgraded to iOS 8, citing a compatibility issue, which it later fixed with an update. For the issue, the company had written in a blog post that it has "discovered that Apple's new iOS 8 introduces a compatibility issue that may prevent Dropbox and Carousel from properly uploading your photos and videos."