Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Fix: avoid deleting project folder #312

Merged
merged 3 commits into from
Jun 7, 2016

Conversation

yann300
Copy link
Contributor

@yann300 yann300 commented May 25, 2016

@@ -103,18 +103,20 @@ QString FileIo::pathFromUrl(QString const& _url)
return path;
}

void FileIo::makeDir(QString const& _url)
bool FileIo::makeDir(QString const& _url)
Copy link
Contributor

Choose a reason for hiding this comment

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

If you change the semantics of this function, you should also change how it is used.
In most places where this is used, the assumption is that the directory can be used afterwards and is clear.

@@ -279,8 +279,12 @@ function copyFiles(path, target)
continue
var deployDir = target + dirs[i].fileName + "/"
if (!fileIo.dirExists(deployDir))
Copy link
Contributor

Choose a reason for hiding this comment

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

This process now fails silently if the directory already exists.

@@ -340,7 +349,11 @@ function generateFileName(name, extension) {
function regenerateCompilationResult()
{
fileIo.deleteDir(compilationFolder)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that safe to delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. This function is called when mix is autogenerating the compilation result. this will never delete content added by the user.

@chriseth chriseth merged commit 56edcce into ethereum:develop Jun 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants