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

Compilation fails when creating a folder when file exists in output folder #942

Closed
myncke opened this issue Sep 6, 2016 · 2 comments
Closed
Milestone

Comments

@myncke
Copy link

myncke commented Sep 6, 2016

Summary

File does not get deleted in output folder prior to creating new folder.

Steps to reproduce

  1. make file without extension
  2. make a route to create a folder with the file name of step 1

Expected behavior

Delete the file, create the folder.

Actual behavior

Crashes

Crash log

https://gist.github.com/myncke/e2aeed489eda1d3131e08385724919df

@denisdefreyne
Copy link
Member

This situation is tricky to solve in a general way, because there’s situations in which the expected behavior is not so clear. For example:

  1. Route one item to /foo
  2. Route another item to /foo/bar

In this case, the proper solution is to error out. (With whatever is the most appropriate error—which might or might not be Errno::EEXIST.)

For this bug in particular, though, it seems that changing the order of pruning and compiling so that pruning is done first, rather than last, would solve the problem. The caveat here is that if pruning is not enabled, this error will still occur… which I believe is fine.

@denisdefreyne
Copy link
Member

Fix in #946.

@denisdefreyne denisdefreyne added this to the 4.3.3 milestone Sep 26, 2016
denisdefreyne added a commit that referenced this issue Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants