Investigate Tempfile naming in Windows #854

Closed
sikachu opened this Issue May 5, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@sikachu
Contributor

sikachu commented May 5, 2012

From #301, it seems like Paperclip still generates a Tempfile with a wrong extension on Windows. For example:

C:/Users/outman/AppData/Local/Temp/[图]飘逸长裙.png20120506-5780-ysdukm

Note the .png, which should not be in front of the timestamp and random character.

However, on CRuby on Mac OS, everything works fine:

/var/folders/b1/0zxmr8g907z1fq8dqj6nrqsr0000gn/T/5k20120504-30664-1hdca53.png
@sikachu

This comment has been minimized.

Show comment Hide comment
@sikachu

sikachu May 5, 2012

Contributor

@outman do you mind telling me how did you install Ruby? I want to know a specific Ruby implementation that I need to tested against.

Contributor

sikachu commented May 5, 2012

@outman do you mind telling me how did you install Ruby? I want to know a specific Ruby implementation that I need to tested against.

@outman

This comment has been minimized.

Show comment Hide comment
@outman

outman May 6, 2012

@sikachu ruby installer for windows , version is 1.9.3p125 (2012-02-16) [i386-mingw32], Rails 3.2.3, paperclip (3.0.3)

outman commented May 6, 2012

@sikachu ruby installer for windows , version is 1.9.3p125 (2012-02-16) [i386-mingw32], Rails 3.2.3, paperclip (3.0.3)

@sikachu

This comment has been minimized.

Show comment Hide comment
@sikachu

sikachu May 11, 2012

Contributor

I'm unable to reproduce this on my windows machine using RailsInstaller though, even on Paperclip 3.0.2. I'm closing this.

irb(main):004:0> Tempfile.new ["image", ".png"]
=> #<File:C:/Users/THOUGH~1/AppData/Local/Temp/image20120511-3652-1pvge0t.png>
irb(main):005:0> Paperclip::Tempfile.new ["image", ".png"]
=> #<File:C:/Users/THOUGH~1/AppData/Local/Temp/image20120511-3652-1ygmtrn.png>
Contributor

sikachu commented May 11, 2012

I'm unable to reproduce this on my windows machine using RailsInstaller though, even on Paperclip 3.0.2. I'm closing this.

irb(main):004:0> Tempfile.new ["image", ".png"]
=> #<File:C:/Users/THOUGH~1/AppData/Local/Temp/image20120511-3652-1pvge0t.png>
irb(main):005:0> Paperclip::Tempfile.new ["image", ".png"]
=> #<File:C:/Users/THOUGH~1/AppData/Local/Temp/image20120511-3652-1ygmtrn.png>

@sikachu sikachu closed this May 11, 2012

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