Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix damaged images when creating projects on windows #1043

Merged
merged 5 commits into from Oct 20, 2012

Conversation

Projects
None yet
3 participants
Contributor

jok2 commented Oct 7, 2012

When a project is created on windows and an image is copied to the new
directory, then the image is damaged because it is not read in binary
mode. 

jok2 added some commits Oct 7, 2012

Fix damaged images when creating projects on windows
When a project is created on windows and an image is copied to the new 
directory, then the image is damaged because it is not read in binary
mode. 
Revert "revert last commit"
This reverts commit 969d893c3c0bbde711e12257d1404c26e46d58ae.
Contributor

jok2 commented Oct 7, 2012

Sorry for the additional commits, this is my first try with GitHub (and GitHub for windows)

Only the first commit is relevant. I tried compass on windows, and some images were damaged when i tried to create a project (even with the default frameworks). It happened with some .png images, the copied ones where one byte smaller than the original ones and couldn't be displayed with either some browser or an image viewer like irfanview.

im more curious to why these don't just use the file copy methods? @chriseppstein

It can be a copy, but the behavior or write_file_to is to report whether the file was overwritten or unchanged, and I always wanted to add handling for letting a user resolve file collisions -- so I was keeping reading separate from writing to allow for that consistent behavior.

scottdavis added a commit that referenced this pull request Oct 20, 2012

Merge pull request #1043 from jok2/stable
Fix damaged images when creating projects on windows

@scottdavis scottdavis merged commit 2052263 into Compass:stable Oct 20, 2012

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