Description
If a page called ChangePassword has a link to an attachment on some other page:
attachment:ScreenShots/Password.jpg
then attempts to edit the page on moin 1.5.3 on W/XP will fail with the error:
[Errno 2] No such file or directory: '/home/web/Moin/drawiki/data/pages\\ChangePassword\\attachments\\ScreenShots/Password.jpg'
The correct file name should be:
'/home/web/Moin/drawiki/data/pages\\ChangePassword\\attachments\\ScreenShots/Password.jpg'
That looks exactly the same as the filename in the error msg above!?
Steps to reproduce
Set up an attachment on another page as described above and then attempt to edit the page with the Gui Editor.
Example
Details
An example functions call trace is attached: ChangePassword.html
Workaround
Discussion
The only wrong thing I can see is the mixing of slash and backslash. For the last slash (between pagename and filename), we could fix this by splitting with the pagesep and joining using os.path.join. But it would still be mixed because the first path parts (data_dir from config) uses slashes and the last parts use backslashes then.
Any suggestions? I don't know exactly how Python/Win32 handles such stuff.
Plan
- Priority:
Assigned to: MoonByeongweon
- Status: fixed