@@ -1024,17 +1024,17 @@ std::error_code openFile(const Twine &Name, int &ResultFD,
1024
1024
auto Open = [&]() { return ::open (P.begin (), OpenFlags, Mode); };
1025
1025
if ((ResultFD = sys::RetryAfterSignal (-1 , Open)) < 0 )
1026
1026
return errnoAsErrorCode ();
1027
- // The underlying operation on these platforms allow opening directories
1028
- // for reading in more cases than other platforms.
1029
- #if defined(__MVS__) || defined(_AIX)
1030
- if (Access == FA_Read) {
1031
- struct stat Status;
1032
- if (fstat (ResultFD, &Status) == -1 )
1033
- return errnoAsErrorCode ();
1034
- if (S_ISDIR (Status.st_mode ))
1035
- return make_error_code (errc::is_a_directory);
1036
- }
1037
- #endif
1027
+ // The underlying operation on these platforms allow opening directories
1028
+ // for reading in more cases than other platforms.
1029
+ #if defined(__MVS__) || defined(_AIX)
1030
+ if (Access == FA_Read) {
1031
+ struct stat Status;
1032
+ if (fstat (ResultFD, &Status) == -1 )
1033
+ return errnoAsErrorCode ();
1034
+ if (S_ISDIR (Status.st_mode ))
1035
+ return make_error_code (errc::is_a_directory);
1036
+ }
1037
+ #endif
1038
1038
#ifndef O_CLOEXEC
1039
1039
if (!(Flags & OF_ChildInherit)) {
1040
1040
int r = fcntl (ResultFD, F_SETFD, FD_CLOEXEC);
0 commit comments