-
Notifications
You must be signed in to change notification settings - Fork 16
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
Added: iron-man-with-gauntlet flag #9
base: master
Are you sure you want to change the base?
Conversation
Solved #8 |
I'm saving files in a separate directory(hidden) and then restoring them back to their original path. |
Hahaaha Nice Work 💃 |
|
||
if(ironManWithGauntlet) { | ||
logger.log(`I... am... Iron Man!`); | ||
const correctPaths = JSON.parse(fs.readFileSync(`${os.homedir()}/.to-dust/correct-paths.json`, 'utf8')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, this will throw en error in case the .to-dust
is not already existing.. You might want to first create the directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry my bad, I put that checking condition below. I'll move it up.
Solved |
lib/snap-fingers.js
Outdated
correctPaths.forEach((filePath) => { | ||
let splitFilePath = filePath.file.split('/'); | ||
let filename = splitFilename.join('-'); | ||
fs.rename(aFile.file, `${os.homedir()}/.to-dust/${filename}`, (err) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this? aFile
is undefiend here. :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the sequence of argument would be reverse. We would want to move files from .to-dust
to its original location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, actually I was having a test branch where I was doing all this and after the fork, I just copied pasted stuff around which caused these issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it and it works now, do let me know if you find any more issues :)
No description provided.