Page MenuHomePhabricator

Moving / renaming files does not work
Closed, ResolvedPublic

Description

When I move rename the page which contains the attachments to another namespace, the files are not moved successfully.

For instance I try to copy the page: File:Example.png to File:Protected_Namespace:Example.png I get the warning:
Warning: rename(C:\inetpub\wwwroot\w\images\/8/8a/Hugo14.png,C:\inetpub\wwwroot\w\images\/103/8/8a/Protected_Namespace:Hugo14.png):
The filename, directory name, or volume label syntax is incorrect.
(code: 123) in C:\inetpub\wwwroot\w\includes\filerepo\FSRepo.php on line 217

I'm obviously using a IIS Server (Windows NT 6.1 build 7601 (Windows Server 2008 R2 Datacenter Edition Service Pack 1) and PHP 5.3.8.

Mediawiki 1.17 and NSFileRepo 1.4 (latest trunk: r108492)

Am I the only one experiencing this error? Might it be a bug?

http://www.mediawiki.org/w/index.php?title=User:Tschuliaen


Version: master
Severity: normal

Details

Reference
bz45364

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:23 AM
bzimport set Reference to bz45364.

Class Title was changed so that it now looks at both the reply status from hook userCan and the array. Therefore, in order not to return a positive result, the array $result needs to be emptied or Title now interprets a non-null as a positive response (user can).

I've added this fix to this bug and will fix it concurrently.