FreeRDP/winpr/libwinpr
ilammy 33e80849a8 wClipboard/posix: add local files to file list
Finally we can add a file to the file list once we have got its local
file name decoded. The interesting part here is what we use for the
remote name.

Suppose the user has selected two files in different directories. In
this case we end up receiving a text/uri-list like this:

  file:///home/bob/foo/a
  file:///home/bob/bar/b

We'd expect to see "a" and "b" pasted into the remote session, so that's
what we should use for the remote names: the base names of the files.
These are the parts from the end up to the last directory delimiter.

One tricky point here is that Windows expects the file names to be
encoded in Unicode, but POSIX does not specify any particular encoding
for file names. Operating systems and file systems generally handle the
file names as mostly opaque bytes strings and do not really care what
encoding is used there. There is no portable API to get the encoding,
it's entirely up to the users and the software they use to correctly
interpret the file names. But we need to do something here.

As of 2017, the most widely used encoding for file names is UTF-8. While
there are marginal communities which stick to codepages for legacy
reasons, we can safely assume that most of the time the file names will
be encoded in UTF-8. In fact, popular desktop environments like GNOME
also assume this. So that's what we will do here as well.
2017-04-09 03:15:49 +03:00
..
asn1 First shot on fixing over linking 2016-03-29 18:14:34 +02:00
bcrypt First shot on fixing over linking 2016-03-29 18:14:34 +02:00
clipboard wClipboard/posix: add local files to file list 2017-04-09 03:15:49 +03:00
com First shot on fixing over linking 2016-03-29 18:14:34 +02:00
comm Added fallback for CMSPAR. (See debian #854689) 2017-02-09 19:58:26 +01:00
credentials Removed windows module.def files. 2016-02-29 15:18:47 +01:00
credui fix string format specifiers 2016-12-16 13:48:43 +01:00
crt Merge pull request #3864 from DavBfr/rewrite-disk-redirection 2017-04-06 17:32:21 +02:00
crypto Fixed memory leak and return value check issue. 2017-03-28 17:56:44 +02:00
dsparse fix string format specifiers 2016-12-16 13:48:43 +01:00
environment Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
error fix string format specifiers 2016-12-16 13:48:43 +01:00
file Fix indentation 2017-04-05 15:35:03 -07:00
handle Merge pull request #3163 from akallabeth/set_file_time 2016-03-02 09:43:46 +01:00
heap Removed windows module.def files. 2016-02-29 15:18:47 +01:00
input Several fixes for keyboard type 7 (japanese) 2016-02-11 21:40:50 +01:00
interlocked Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
io winpr: fix UWP portability 2016-12-02 13:18:55 -05:00
library ifdef's for Cygwin compilation 2017-02-10 18:06:20 +03:00
locale First shot on fixing over linking 2016-03-29 18:14:34 +02:00
memory First shot on fixing over linking 2016-03-29 18:14:34 +02:00
nt fix string format specifiers 2016-12-16 13:48:43 +01:00
path Misc Fixes 2017-03-17 14:07:33 -07:00
pipe Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
pool fix string format specifiers 2016-12-16 13:48:43 +01:00
registry fix string format specifiers 2016-12-16 13:48:43 +01:00
rpc fix string format specifiers 2016-12-16 13:48:43 +01:00
security First shot on fixing over linking 2016-03-29 18:14:34 +02:00
shell Fixed android build issues. 2016-02-01 15:21:07 +01:00
smartcard smartcard: implement ListReaderGroups 2017-02-16 16:59:03 +01:00
sspi Fixed GetEnvironmentVariable. 2017-03-03 12:43:00 +01:00
sspicli winpr/synch: remove the dependency on winsock.h 2015-07-14 11:39:41 +02:00
synch Fixed RPATH settings for OS X 2017-04-06 08:08:07 +02:00
sysinfo Added test for GetComputerName/GetComputerNameEx 2017-02-28 11:03:10 +01:00
thread Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
timezone Update timezone data to Dec 2016 2017-01-11 16:56:34 -05:00
utils Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
winhttp winpr: always build "monolitic" 2014-07-10 11:10:58 +02:00
winsock ifdef's for Cygwin compilation 2017-02-10 18:06:20 +03:00
wnd fix string format specifiers 2016-12-16 13:48:43 +01:00
wtsapi Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
CMakeLists.txt Build: Use correct pdb names when installing with symbols 2017-01-31 13:32:51 +01:00
dummy.c freerdp: various missing link dependencies and symbol exports 2013-09-03 21:48:26 -04:00
log.h Moved logging defines to main logger. 2014-09-09 16:32:04 +02:00