9 Commits
Author SHA1 Message Date
Guogang Li e822493662 Fixed file issue when user name includes unicode
PiperOrigin-RevId: 761710897
2025-05-21 16:22:02 -07:00
Francis Tsui 7a02d2f888 Fix folder transfer.
PiperOrigin-RevId: 698044680
2024-11-19 09:26:49 -08:00
John Carroll 180b76cf84 Split file path processing off into it's own static class and implement validation.
PiperOrigin-RevId: 485890871
2022-11-03 09:18:34 -07:00
hai007 41ba8c8a14 Convert #include <xstring> to #include <string> in nearby files.
`<xstring>` is the MSVC internal implementation file for string. This makes it contingent on the MSVC STL.

`<string>` provides the same declarations, but does not expose the MSVC-specific implementation details. This implementation is guaranteed to meet the C++ standard exactly.

This change updates includes of `<xstring>` to be includes of `<string>`.

PiperOrigin-RevId: 483696244
2022-10-25 09:30:40 -07:00
John Carroll 646c3e5020 Move the increment rename tag (x) from before the first dot to before the last dot.
PiperOrigin-RevId: 477849732
2022-09-29 16:26:36 -07:00
John Carroll 55c4714b99 Cleanup the code. Change inputs on ImplementationPlatform::GetDownloadPath from std::string& to absl::string_view.
PiperOrigin-RevId: 472770249
2022-09-07 11:22:24 -07:00
jfcarroll d09223d435 Prevent escaping the users Downloads folder by removing all occurances of /.. from the path passed in.
PiperOrigin-RevId: 465450615
2022-08-04 18:13:29 -07:00
jfcarroll 87c76ea235 The file was overwritten when transferring a file that already existed in the downloads folder. With this change we now add " (x)", where x is an incrementing number, starting at 1, using the next non-existing number, to the file name, just before the first dot, or at the end if no dot. This has been applied to the GetDownloadPath method in the platform api.
PiperOrigin-RevId: 457530287
2022-06-27 11:44:15 -07:00
jfcarroll 517d77f5aa This adds parent path and file name to the Payload constructor. This will affect chrome.
PiperOrigin-RevId: 435223740
2022-03-16 19:18:13 -07:00