Merge pull request #583 from ethereum/fixCreateNewFile

Fix new file creation
pull/1/head
yann300 8 years ago committed by GitHub
commit ed71a0e246
  1. 3
      src/app.js

@ -86,7 +86,8 @@ var run = function () {
function createNonClashingName (path) {
var counter = ''
while (files.exists(path + counter)) {
if (path.endsWith('.sol')) path = path.substring(0, path.lastIndexOf('.sol'))
while (files.exists(path + counter + '.sol')) {
counter = (counter | 0) + 1
}
return path + counter + '.sol'

Loading…
Cancel
Save