more posix
This commit is contained in:
parent
5681f14967
commit
9cc730e6a9
3 changed files with 8 additions and 2 deletions
|
@ -324,10 +324,12 @@ export default function Uploader({
|
|||
// Trigger an upload when any of the dependencies change.
|
||||
useEffect(() => {
|
||||
const allItemAndPaths = [
|
||||
// See: [Note: webkitRelativePath]
|
||||
// See: [Note: webkitRelativePath]. In particular, they use POSIX
|
||||
// separators.
|
||||
webFiles.map((f) => [f, f.webkitRelativePath ?? f.name]),
|
||||
desktopFiles.map((fp) => [fp, fp.path]),
|
||||
desktopFilePaths.map((p) => [p, p]),
|
||||
// ze[1], the entry name, uses POSIX separators.
|
||||
desktopZipItems.map((ze) => [ze, ze[1]]),
|
||||
].flat() as [UploadItem, string][];
|
||||
|
||||
|
|
|
@ -641,7 +641,7 @@ export interface FolderWatchSyncedFile {
|
|||
* >
|
||||
* > The path stored MUST NOT contain a drive or device letter, or a leading
|
||||
* > slash. All slashes MUST be forward slashes '/' as opposed to backwards
|
||||
* > slashes '\' for compatibility with Amiga and UNIX file systems etc. If
|
||||
* > slashes '\' for compatibility with Amiga and UNIX file systems etc. If
|
||||
* > input came from standard input, there is no file name field.
|
||||
* >
|
||||
* > https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
|
||||
|
|
|
@ -60,6 +60,10 @@ export default function useFileInput({
|
|||
// containing the relative path to the selected directory.
|
||||
//
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory
|
||||
//
|
||||
// These paths use the POSIX path separator ("/").
|
||||
// https://stackoverflow.com/questions/62806233/when-using-webkitrelativepath-is-the-path-separator-operating-system-specific
|
||||
//
|
||||
const directoryOpts = directory
|
||||
? { directory: "", webkitdirectory: "" }
|
||||
: {};
|
||||
|
|
Loading…
Add table
Reference in a new issue