Skip to content

Commit ee761f8

Browse files
author
The etils Authors
committed
Remove hardcoded 0x777 file mode
PiperOrigin-RevId: 748025321
1 parent a17eaf4 commit ee761f8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

etils/epath/backend.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def makedirs(
302302
exist_ok: bool = False,
303303
mode: Optional[int] = None,
304304
) -> None:
305-
if mode is not None and mode != 0o777:
305+
if mode is not None and mode != 0o750:
306306
# tf.io.gfile do not support setting `mode=`
307307
raise NotImplementedError(
308308
'makedirs with custom `mode=` not supported for tf.io.gfile backend.'
@@ -328,7 +328,7 @@ def mkdir(
328328
exist_ok: bool = False,
329329
mode: Optional[int] = None,
330330
) -> None:
331-
if mode is not None and mode != 0o777:
331+
if mode is not None and mode != 0o750:
332332
# tf.io.gfile do not support setting `mode=`
333333
raise NotImplementedError(
334334
'mkdir with custom `mode=` not supported for tf.io.gfile backend.'
@@ -484,7 +484,7 @@ def makedirs(
484484
exist_ok: bool = False,
485485
mode: Optional[int] = None,
486486
) -> None:
487-
if mode is not None and mode != 0o777:
487+
if mode is not None and mode != 0o750:
488488
# FileSystemSpec backend do not support setting `mode=`
489489
raise NotImplementedError(
490490
'makedirs with custom `mode=` not supported for FileSystemSpec'
@@ -499,7 +499,7 @@ def mkdir(
499499
exist_ok: bool = False,
500500
mode: Optional[int] = None,
501501
) -> None:
502-
if mode is not None and mode != 0o777:
502+
if mode is not None and mode != 0o750:
503503
# FileSystemSpec backend do not support setting `mode=`
504504
raise NotImplementedError(
505505
'mkdir with custom `mode=` not supported for FileSystemSpec backend.'

0 commit comments

Comments
 (0)