Changeset 26f47cd441beeadb2ffc9a6ab7091595de431a0a
- Timestamp:
- 01/22/08 07:20:39
(10 months ago)
- Author:
- William McBrine <wmcbrine@gmail.com>
- git-committer:
- William McBrine <wmcbrine@gmail.com> 1201008039 -0500
- git-parent:
[c8bd343a5c04238ee79615c84a8e6c112aee0ce3]
- git-author:
- William McBrine <wmcbrine@gmail.com> 1201008039 -0500
- Message:
Check for an exact match to the share name, instead of "startswith".
This should fix the problems people had when one share name was a subset
of another, and it's also less work for the program.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rc8bd343 |
r26f47cd |
|
| 29 | 29 | |
|---|
| 30 | 30 | def do_GET(self): |
|---|
| | 31 | |
|---|
| | 32 | basepath = unquote_plus(self.path).split('/')[1] |
|---|
| 31 | 33 | |
|---|
| 32 | 34 | ## Get File |
|---|
| 33 | 35 | for name, container in self.server.containers.items(): |
|---|
| 34 | | #XXX make a regex |
|---|
| 35 | | path = unquote_plus(self.path) |
|---|
| 36 | | if path.startswith('/' + name): |
|---|
| | 36 | if basepath == name: |
|---|
| 37 | 37 | plugin = GetPlugin(container['type']) |
|---|
| 38 | 38 | plugin.send_file(self, container, name) |
|---|