You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
def relative_path_prefix
raise RuntimeError.new("Trying to access file_column, but primary key got lost.") if @instance.id.to_s.empty?
File.join(*("%08d" % @instance.id).scan(/..../))
end
The id of my object with file_column gets more than 8 digits and the directory paths sometimes conflict because of this.
Hi,
I found the lines as below in file_column.rb:
The id of my object with file_column gets more than 8 digits and the directory paths sometimes conflict because of this.
irb(main):023:0> ("%08d" % 12345678).scan(/..../)
=> ["1234", "5678"]
irb(main):024:0> ("%08d" % 123456789).scan(/..../)
=> ["1234", "5678"]
irb(main):025:0> ("%08d" % 1234567890).scan(/..../)
=> ["1234", "5678"]
irb(main):026:0> ("%08d" % 12345678901).scan(/..../)
=> ["1234", "5678"]
irb(main):027:0> ("%08d" % 123456789012).scan(/..../)
=> ["1234", "5678", "9012"]
Could you resolve this issue?
Thanks,
ebi
The text was updated successfully, but these errors were encountered: