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 753590 - [PATCH] return ENOTEMPTY if trying to delete a non-empty directory
[PATCH] return ENOTEMPTY if trying to delete a non-empty directory
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: mtp backend
git master
Other Linux
: Normal major
: ---
Assigned To: Philip Langdale
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-08-13 15:10 UTC by Gabriel de Perthuis
Modified: 2015-08-30 18:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MTP: return ENOTEMPTY if trying to delete a non-empty directory (1.74 KB, patch)
2015-08-13 15:10 UTC, Gabriel de Perthuis
committed Details | Review
mtp: Fix error handling from a807f12d5663 (1.21 KB, patch)
2015-08-29 21:08 UTC, Ross Lagerwall
committed Details | Review

Description Gabriel de Perthuis 2015-08-13 15:10:20 UTC
Created attachment 309211 [details] [review]
MTP: return ENOTEMPTY if trying to delete a non-empty directory

rmdir (through gvfs-fuse) acted as rm -rf before this patch, which caused easy data loss.
Comment 1 Philip Langdale 2015-08-13 18:19:47 UTC
Review of attachment 309211 [details] [review]:

Looks good. Thanks.
Comment 2 Ross Lagerwall 2015-08-29 21:08:08 UTC
Created attachment 310292 [details] [review]
mtp: Fix error handling from a807f12d5663

After commit a807f12d5663 ("MTP: return ENOTEMPTY if trying to delete a
non-empty directory"), G_IO_ERROR_NOT_EMPTY is returned if a generic
error occurs when deleting. Fix it by calling fail_job() as the rest of
the code does.
Comment 3 Ross Lagerwall 2015-08-29 21:09:16 UTC
Thanks for the original fix. Attached is a small update for it.
Comment 4 Philip Langdale 2015-08-30 16:37:33 UTC
Review of attachment 310292 [details] [review]:

Thanks!
Comment 5 Ross Lagerwall 2015-08-30 18:21:43 UTC
Comment on attachment 310292 [details] [review]
mtp: Fix error handling from a807f12d5663

Pushed to master as fdba530. Thanks for the review.