! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
not CRLF but LF in uri-list sometimes not work
Status:
CLOSED: FIXED
Product:
Thunar-vfs
Component:
General

Comments

Description kz 2006-08-14 18:05:38 CEST
Using vlc, dnd from thunar made vlc put error with dropped uris.
So tried rox-filer and pcmanfm (that works well with vlc) and found difference.

Other file managers put uris just in a line. thunar-vfs puts them each lines.
thunar_vfs_path_list_to_string() is the place.

Why uris should have newline each?
Comment 1 kz 2006-08-14 18:28:47 CEST
In rox-filer, dnd.c:357 uri_list_to_utf8() calls g_string_append_c(new, ' ');
In pcmanfm, ptk-file-browser.c:1668 on_folder_view_drag_data_get() calls g_string_append( uri_list, "\r\n" );

And in thunar, thunar_vfs_path_list_to_string() calls buffer[bufpos++] = '\n';
Comment 2 Benedikt Meurer editbugs 2006-08-14 18:33:06 CEST
Because thats the format for text/uri-list, as specified by RFC2169 (Appendix A) and RFC2483 (Section 5):

"[...] Each URI shall appear on one and only one line. [...] As for all text/* formats, lines are terminated with a CR LF pair, although clients should be liberal in accepting lines with only one of those characters."

So Thunar is correct (well it adds only \n, but as specified above, "clients should be liberal in accepting lines with only one of those characters"). File a bug report to vlc instead.
Comment 3 kz 2006-08-14 19:14:42 CEST
Well, I've just read that LF alone is allowed. So I ask this report
in the name of workaround. :) Xfce terminal shows uri-list in a line
when I insert \r above \n as follows. (vlc also works well)

          buffer[bufpos++] = '\r';
          buffer[bufpos++] = '\n';
Comment 4 Benedikt Meurer editbugs 2006-08-14 19:38:55 CEST
Fixed with revision 22757.

2006-08-14	Benedikt Meurer <benny@xfce.org>

	* thunar-vfs/thunar-vfs-path.c(thunar_vfs_path_list_to_string): Use
	  CRLF for text/uri-list, as specified by RFC 2483. Bug #2166.

Bug #2166

Reported by:
kz
Reported on: 2006-08-14
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information