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

Use abspath when building cakedir from static_dir #1

Merged
merged 1 commit into from Apr 16, 2014

Conversation

Projects
None yet
2 participants
@fordhurley
Copy link
Contributor

fordhurley commented Apr 14, 2014

This change allows for using relative path tricks like .. in the cakeparent parameter. This was needed in my case because my app is organized with the webapp part as a submodule to the full package.

For example, my app is in

/home/ubuntu/projectdir

The coffeescript files are in

/home/ubuntu/projectdir/package/subpackage/webapp/static/coffee/

I tried initializing Flask-Cake with the cakeparent keyword argument as:

cake = Cake(app, ['build', 'compress'], cakeparent='../package/subpackage/webapp/static/coffee/')

This resulted in the error:

IOError: [Errno 2] No such file or directory: '/home/ubuntu/projectdir/static/../package/subpackage/webapp/static/coffee/Cakefile'

The patch fixed the issue because it properly expanded the .. so that it looked for the Cakefile at:

/home/ubuntu/projectdir/package/subpackage/webapp/static/coffee/Cakefile

rsenk330 added a commit that referenced this pull request Apr 16, 2014

Merge pull request #1 from fordhurley/fix-static-path
Use abspath when building cakedir from static_dir

@rsenk330 rsenk330 merged commit cc8e228 into rsenk330:master Apr 16, 2014

@rsenk330

This comment has been minimized.

Copy link
Owner

rsenk330 commented Apr 16, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment