Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Working Directory Menu Option #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aeonwilliams
Copy link
Contributor

Creates an option in 'File' in the launcher and project to 'Open Backup Directory', which opens the Temp directory.

Creates an option in 'File' in the launcher and project to 'Open Backup Directory', which opens the Temp directory.
Copy link
Contributor

@LukePowell LukePowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path.join(app.getPath('temp'), 'dragondrop') is the correct temp folder path, note path.join will use the correct platform separator no need to add a platform specific separator yourself.

menuHash['File'].push({
label: 'Open Backup Directory',
click() {
switch (process.platform) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason for this to be windows only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, duh. This was left over from a thought process that the location would be OS specific, but clearly it's already dynamic based on where the project is located.

click() {
switch (process.platform) {
case 'win32':
shell.showItemInFolder(path.join(app.getPath('temp'), '\\Temp'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
shell.showItemInFolder(path.join(app.getPath('temp'), '\\Temp'));
shell.showItemInFolder(path.join(app.getPath('temp'), 'dragondrop'));

Simplified and corrected the code according to the github comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants