Merge pull request #36 from thxo/remove-dot-suffix-randomname

Ensure no trailing dot in random filenames
This commit is contained in:
Eric Johansson (neku) 2019-12-15 01:16:01 +01:00 committed by GitHub
commit 4645ec5b89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,10 @@ function gen_name($arg, $in){
} }
switch($arg){ switch($arg){
case 'random': case 'random':
return $name.'.'.$in; if($in){
return $name.'.'.$in;
}
return $name;
break; break;
case 'custom_original': case 'custom_original':
return $name.'_'.$in; return $name.'_'.$in;