Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

shutil.copytree fails on bcachefs case insensitive directories #144220

Open
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@neVERberleRfellerER

Description

@neVERberleRfellerER

Bug report

Bug description:

On bcachefs create case insensitive directory with some file inside:

mkdir ncschattr +F ncstouch ncs/something.txt

then do this

importshutilshutil.copytree("ncs/","target/")

fails with

Traceback (most recent call last):  File "<string>", line 1, in <module>    import shutil; shutil.copytree("ncs/", "target/")                   ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^  File "/usr/lib/python3.14/shutil.py", line 654, in copytree    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,                     ignore=ignore, copy_function=copy_function,                     ignore_dangling_symlinks=ignore_dangling_symlinks,                     dirs_exist_ok=dirs_exist_ok)  File "/usr/lib/python3.14/shutil.py", line 608, in _copytree    raise Error(errors)shutil.Error: [('ncs/', 'target/', "[Errno 39] Directory not empty: 'target/'")]

This is because of

listxattr("ncs/", "bcachefs.casefold\0bcachefs_effec"..., 256) = 46getxattr("ncs/", "bcachefs.casefold", "1", 128) = 1setxattr("target/", "bcachefs.casefold", "1", 1, 0) = -1 ENOTEMPTY (Directory not empty)getcwd("/home/user/_x", 1024)           = 14

happening after contents were copied and case insensitivity can't be enabled afterwards.
Note: On ext4 copytree results in a directory without casefolding flag.

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp