Opened 18 years ago
Closed 16 years ago
#5334 closed defect (duplicate)
UNC paths from command line in trac-admin corrupted
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | admin/console | Version: | 0.10.4 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
On Windows, when using a UNC path with backslashes as an argument to trac-admin like the following:
python trac-admin \path\to\projenv hotcopy \\server\folder\path\to\backup
The following output is produced:
Hotcopying \path\to\projenv to \\\\server\\folder\\path\\to\\backup ...Command failed: [Errno 2] No such file or directory
Executing the hotcopy command within the trac-admin shell with the same path succeeds.
A workaround is to use forward slashes in place of the backslashes on the command line for the UNC path.
Attachments (0)
Change History (3)
comment:1 by , 18 years ago
comment:2 by , 17 years ago
Don't know if it is expected but using forward slashes can work around this problem:
trac-admin C:\data\Projets\trac\Project hotcopy nas/Trac/Backup/Project
It looks like the problem occurs when building the string to pass to onecmd at admin.py line 1227. The input
args
list contains the correct UNC string, however in thes_args
string all of the backslashes are doubled.