Comment 22 for bug 1971168

Revision history for this message
In , Lissyx+mozillians (lissyx+mozillians) wrote :

I cant repro the behavior outside of `snap` it seems:
```
#include <stdio.h>
#include <glib.h>
#include <gio/gio.h>

void
print_type (const char* file_uri)
{
        GFile* my_file = g_file_new_for_uri(file_uri);
 char* path = g_file_get_path(my_file);
 fprintf (stdout, "uri:%s => path:%s\n", file_uri, path);
        g_object_unref(my_file);
}

int
main (void)
{
        const char* files[] = {
                "smb://192.168.1.36/documents/Patches/QPdfPresenterConsole-2.7.0-Darwin-x86_64.zip",
        };
        int num_files = sizeof(files)/sizeof(files[0]);
        for(int f = 0; f < num_files; ++f) {
                print_type(files[f]);
        }
        return 0;
}
```

build with
```
gcc gio-test-files.c `pkg-config --cflags --libs glib-2.0 --libs gio-2.0` -o gio-test-files
```

and running:
```
$ ./gio-test-files
uri:smb://192.168.1.36/documents/Patches/QPdfPresenterConsole-2.7.0-Darwin-x86_64.zip => path:/run/user/1000/gvfs/smb-share:server=192.168.1.36,share=documents/Patches/QPdfPresenterConsole-2.7.0-Darwin-x86_64.zip
```