Bug Description
Studio.new('~/code-metrics.js') creates a file at ~/~/code-metrics.js instead of ~/code-metrics.js.
Steps to Reproduce
Studio.new('~/myfile.js')
// Returns: {success: true, path: "~/~/myfile.js"}
Expected Behavior
Studio.new('~/myfile.js')
// Returns: {success: true, path: "~/myfile.js"}
Current Workaround
Studio.new('myfile.js') // Without ~/ prefix
// Returns: {success: true, path: "~/myfile.js"}
Root Cause
Likely the new() function prepends ~/ unconditionally without checking if the path already starts with it.
Bug Description
Studio.new('~/code-metrics.js')creates a file at~/~/code-metrics.jsinstead of~/code-metrics.js.Steps to Reproduce
Expected Behavior
Current Workaround
Root Cause
Likely the
new()function prepends~/unconditionally without checking if the path already starts with it.