After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795311 - Use stable URIs for PTP backend
Use stable URIs for PTP backend
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: gphoto backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Philip Langdale
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2018-04-17 02:45 UTC by Philip Langdale
Modified: 2018-04-18 23:07 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Switch to a stable device URI (7.77 KB, patch)
2018-04-18 03:37 UTC, Philip Langdale
accepted-commit_now Details | Review

Description Philip Langdale 2018-04-17 02:45:06 UTC
In Bug 744267, I changed the URI generation logic for the MTP backend to use the device ID instead of the usb bus/dev numbers so that URIs would be stable across plug/unplug events.

I will now make an equivalent change for the PTP backend.
Comment 1 Philip Langdale 2018-04-18 03:37:51 UTC
Created attachment 371077 [details] [review]
Switch to a stable device URI

Mostly similar to the MTP version.

I tested with the old monitor to verify the compatibility code.
Comment 2 Ondrej Holy 2018-04-18 08:59:30 UTC
Review of attachment 371077 [details] [review]:

Thanks, looks ok, works ok.

::: monitor/gphoto2/ggphoto2volumemonitor.c
@@ +253,2 @@
         volume = g_gphoto2_volume_new (G_VOLUME_MONITOR (monitor),
+                                       device,

nitpick: unrelated whitespace change
Comment 3 Philip Langdale 2018-04-18 23:07:56 UTC
Pushed as efc76d0cd84df8904ea661cb0e04728e3e6205d4

Thanks.