Repository navigation
docs: document that shell.trashItem requires backslashes - #49038
Conversation
|
I'd suggest fixing the underlying bug instead of documenting the behavior. |
76ec279 to
a519c49
Compare
|
I updated it to say that path.resolve() should be used, maybe my new text is better? (By the way I just filed this because I hit the behaviour on this particular function and it took me a while to figure out why it wasn't working. Then when I finally did and searched for it, I noticed from the earlier bug report that somebody else had hit the exact same problem before, so I thought it might be worth documenting.) |
a519c49 to
509aaa8
Compare
nikwen
left a comment
There was a problem hiding this comment.
Thank you!
Could you please sign your commits? (See the bot comment above.) Otherwise, we can't merge them.
shell.trashItem requires backslashes
509aaa8 to
bdea5a2
Compare
|
@nikwen Apologies for missing that. I have amended the commit to add signature (no other changes), it is showing verified so hopefully that's OK. |
|
@sammarshallou can you rebase this? |
…shes In Windows many functions relating to files (e.g. shell.openItem, the Node fs functions, as well as native Win32 APIs) will accept either type of slash / or \ as a folder separator. shell.trashItem does not work with / as folder separator in Windows. This documentation change explains that. See also: electron#28831
bdea5a2 to
a57d666
Compare
|
@codebytere I have rebased against 'main' branch, hopefully that is ok (there were no conflicts). |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
No Release Notes |
|
I have automatically backported this PR to "39-x-y", please check out #49479 |
|
I have automatically backported this PR to "40-x-y", please check out #49480 |
|
I have automatically backported this PR to "41-x-y", please check out #49481 |
In Windows many functions relating to files (e.g. shell.openItem, the Node fs functions, as well as native Win32 APIs) will accept either type of slash / or \ as a folder separator.
shell.trashItem does not work with / as folder separator in Windows. This documentation change explains that.
See also:
#28831
Description of Change
Checklist
npm testpassesRelease Notes
Notes: none