Skip to content

Commit

Permalink
common: skip undefined open flags on Windows
Browse files Browse the repository at this point in the history
O_NOFOLLOW and O_DIRECTORY are not available on Windows.
We'll just skip those flags for now when converting flags.

Signed-off-by: Lucian Petrut <[email protected]>
  • Loading branch information
petrutlucian94 committed Jul 27, 2020
1 parent e3c28c3 commit 9ce91a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/ceph_fs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ int ceph_flags_sys2wire(int flags)
ceph_sys2wire(O_CREAT);
ceph_sys2wire(O_EXCL);
ceph_sys2wire(O_TRUNC);

#ifndef _WIN32
ceph_sys2wire(O_DIRECTORY);
ceph_sys2wire(O_NOFOLLOW);
// In some cases, FILE_FLAG_BACKUP_SEMANTICS may be used instead
// of O_DIRECTORY. We may need some workarounds in order to handle
// the fact that those flags are not available on Windows.
#endif

#undef ceph_sys2wire

Expand Down

0 comments on commit 9ce91a6

Please sign in to comment.