blob: ad3aadbce9a87028407c8bda5fe9727c202cf831 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
It seems as if windows clients (IE) submit filenames with backslash as directory separator.
(no surprise :-).
But the attachment plugin translates these backslashes to underscore, making the
whole path a filename.
> As far as I can see, that just means that the file will be saved with
> a filename something like `c:__92__My_Documents__92__somefile`.
> I don't see any "does not work" here. Error message?
>
> Still, I don't mind adding a special case, though obviously not in
> `basename`. [[done]] --[[Joey]]
This little hack fixed the backslash problem, although I wonder if that
really is the problem?
(Everything works perfectly from linux clients of course. :-)
sub basename ($) {
my $file=shift;
$file=~s!.*/+!!;
$file=~s!.*\\+!!;
return $file;
}
Should probably be `$file=~s!.*[/\\]+!!` :-)
|