File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -735,7 +735,17 @@ static const struct pdo_dbh_methods sqlite_methods = {
735
735
static char * make_filename_safe (const char * filename )
736
736
{
737
737
if (* filename && strncasecmp (filename , "file:" , 5 ) == 0 ) {
738
- char * fullpath = expand_filepath (filename + 5 , NULL );
738
+ char * fullpath ;
739
+ if (strncasecmp (filename + 5 , "///" , 3 ) == 0 ) {
740
+ fullpath = expand_filepath (filename + 7 , NULL );
741
+ } else if (strncasecmp (filename + 5 , "//localhost/" , 12 ) == 0 ) {
742
+ fullpath = expand_filepath (filename + 16 , NULL );
743
+ } else if (strncasecmp (filename + 5 , "//" , 2 ) == 0 ) {
744
+ // authority error on sqlite3_open_v2
745
+ return filename ;
746
+ } else {
747
+ fullpath = expand_filepath (filename + 5 , NULL );
748
+ }
739
749
740
750
if (!fullpath ) {
741
751
return NULL ;
You can’t perform that action at this time.
0 commit comments