#17 new
Joe Van Dyk

Won't work once you get more than 99,999,999 uploads

Reported by Joe Van Dyk | September 25th, 2007 @ 12:43 AM

Is that a problem?

Reason:

irb(main):012:0> ("%08d" % 99999999).scan(/..../)
=> ["9999", "9999"]
# Works fine


irb(main):013:0> ("%08d" % 100000001).scan(/..../)
=> ["1000", "0000"]
# Hey, where'd that last one go?

Comments and changes to this ticket

  • Joe Van Dyk

    Joe Van Dyk September 25th, 2007 @ 12:46 AM

    • Assigned user set to “Rick”

    So I'd recommend using "%012d". That would allow you to have a trillion uploads, right? Unfortunately, this will break existing code. You'd need a script to copy all the files to the appropriate place.

    Maybe worry about it once you get to that level? :-)

  • Joe Van Dyk

    Joe Van Dyk September 25th, 2007 @ 12:49 AM

    Although, you'd likely run into other problems once you got to that level. at 100KB per upload, 99 million uploads would be 1000 terabytes.

    Perhaps I won't worry about yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages