#6429 closed defect (wontfix)
Rename to a name "deeper" in dir hierarchy fails with attachments
Reported by: | anonymous | Owned by: | Noah Kantrowitz |
---|---|---|---|
Priority: | normal | Component: | WikiRenamePlugin |
Severity: | normal | Keywords: | attachment |
Cc: | Trac Release: | 0.11 |
Description
in the util.py it is doing an:
os.reanmes(from_path, to_path)
however if you are trying to rename:
/SomeName/SubName ==> /SomeName/SubName/ItemName
The OSError 22 happens since it is trying to move a dir to a sub dir which doesn't work. I add a tmp dir step to solve this for me.
from tempfile import mkdtemp ... tmp_path = mkdtemp() debug('Moving from %r to %r', from_path, tmp_path) os.renames(from_path, tmp_path) debug('Moving from %r to %r', tmp_path, to_path) os.renames(tmp_path, to_path)
Attachments (0)
Change History (5)
comment:1 Changed 15 years ago by
Summary: | Rename to a a name "deeper" in heirarchy fails with attachments → Rename to a name "deeper" in heirarchy fails with attachments |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Keywords: | attachment added |
---|---|
Summary: | Rename to a name "deeper" in heirarchy fails with attachments → Rename to a name "deeper" in dir hierarchy fails with attachments |
since this looks reasonable, just a quick question to (anonymous):
Did you check a situation the other way round too: i.e.
/SomeName/SubName/ItemName ==> /SomeName/SubName
looks as if there would arise the need check, if there is an empty dir left, that should be deleted IMHO for good housekeeping in filesystem, right?
comment:4 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The plugin is deprecated since there is now support in the Trac core.
Replying to anonymous: Or formatted correctly :)
in the util.py it is doing an: