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

Temp Fix for watched folders and Added RSS author attribute. #85

Closed
wants to merge 2 commits into from

Conversation

LucioFranco
Copy link
Contributor

Small temp fixes for path issues when the build folder is in the same dir as the source folder.

Fixes #84 and Partly Fixes #63.

@LucioFranco LucioFranco changed the title small temp fixes for watch and rss Temp Fix for watched folders and Added RSS author attribute. Apr 13, 2016
@@ -128,8 +128,10 @@ pub fn build(config: &Config) -> Result<()> {
!template_extensions.contains(&f.path()
.extension()
.unwrap_or(OsStr::new(""))) &&
f.path() != dest && f.path() != layouts_path.as_path()
f.path() != dest && !f.path().starts_with(Path::new("./").join(dest)) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is solving the problem cleanly enough. From what I can gather you want to prevent copying things that are inside the /dest folder. I think a better way to do this is to replace the filter above with filter_entry from walkdir (see http://burntsushi.net/rustdoc/walkdir/#example-skip-hidden-files-and-directories-efficiently-on-unix)

@johannhof
Copy link
Contributor

I'm a bit unsure about the way you check if the watched file is not in the dest directory. An alternative would be to walk over val.path components and check any matches the dest.

What do you think? :)

@LucioFranco
Copy link
Contributor Author

@johannhof I'm thinking of using the stuff on #86 instead of the stuff in this PR. What do you think?

@LucioFranco
Copy link
Contributor Author

Closing this so that it can be implemented properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support all fields from the RSS spec Watch command ignore destination dir
2 participants