Fix portability opendir() behavior on paths without trailing slashes
authorAndrew Krieger <andrew.krieger@oculus.com>
Tue, 29 Aug 2017 05:33:44 +0000 (22:33 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 29 Aug 2017 05:38:50 +0000 (22:38 -0700)
commitd39c5f3dceb2c7eaf86e40ad1b839af8d7f0e1e5
treea5582c7c02ad417e8defc2b2546d2496991612e2
parentb3aabafd2d5306d85105bcdb55b2c2422628ecaa
Fix portability opendir() behavior on paths without trailing slashes

Summary:
Off-by-one error in DIR::open() would result in paths not
ending in a trailing separator to fail to open. Fix the arithmetic.

Reviewed By: Orvid

Differential Revision: D5579657

fbshipit-source-id: 79507bc398549033eb26b2ffa788d66241deb623
folly/portability/Dirent.cpp