Ticket #9609 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

Support relative download directory path in conf

Reported by: jonasbardino Assigned to: Blackhex
Priority: normal Component: DownloadsPlugin
Severity: minor Keywords: relative path conf
Cc: rjollos Trac Release: 0.11

Description

I would like to have relative downloads path support so that I can use a single inherited trac.ini for all my Trac instances:

[downloads]
path = downloads

If I try that with the latest 0.11 release I get a path error when uploading:

2011-12-13 10:05:33,616 Trac[main] WARNING: HTTPInternalError: 500 Trac Error (Error storing file somefile.zip! Is dir
ectory specified in path config option in [downloads] section of trac.ini existing?)

I've attached a simple patch that mirrors the graphviz plugin cache_dir extraction to achieve the goal.

Feel free to apply it as is or implement it in a better way.

---

Downloadsplugin: 0.11 branch (r11035, pip installed from trac-hacks.org)
Trac: 0.11.7-4 debian package
Server: Apache 2.2.16-6+squeeze4 debian package
Database: sqlite 3.7.3-1 debian package
OS: Linux

Attachments

api.py.diff (1.2 kB) - added by jonasbardino on 12/13/11 12:24:29.
patch against api.py to support relative path (updated source path so 'patch -p0 < api.py.diff' works)

Change History

12/13/11 12:24:29 changed by jonasbardino

  • attachment api.py.diff added.

patch against api.py to support relative path (updated source path so 'patch -p0 < api.py.diff' works)

12/14/11 03:16:22 changed by rjollos

  • cc set to rjollos.

Add/Change #9609 (Support relative download directory path in conf)




Change Properties
Action