Re: does gvfsd-mtp support the POSIX API `rename`?



On Tue, 5 Jan 2021 10:20:18 +0100
Ondrej Holy <oholy redhat com> wrote:

Hi,

the wiki page is slightly outdated. The native move/copy is really
possible with MTP backend, however, it is not supported by all devices
unfortunately, which is probably your case. The problem is that the
display_name is not for all backends the same as file_name and thus
the FUSE daemon calls g_file_move instead of g_file_set_display_name
in this case. Maybe the MTP backend should fallback internally to
LIBMTP_Set_File_Name in this case..

I suppose this is possible for the specific case of renaming a file
with `mv` inside a directory. You can't move a file between directories
this way, even though POSIX rename allows it, as in MTP you have to
update the parent object and that's what the MTP move operation does.

--phil


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]