qsbase / qs

Quick serialization of R objects
405 stars 19 forks source link

To do: Add error message for file names too long #72

Closed traversc closed 1 year ago

traversc commented 2 years ago

I'm happy to start a new issue because it's only tangentially related. But I was also getting basic_ios::clear: iostream error. I was red-lining my memory use so thought it could be from that. But when I changed it to saveRDS I got

  cannot open compressed file '/home/...VERY LONG FILENAME...', probable reason 'File name too long'

and I didn't realize there was such a limit. I made a shorter filename, reran, and both qs and saveRDS worked

I think it could be helpful for qs to also give probable reasons for such weirdness if possible because it's a pretty easy fix once I knew what to do

(Side note: qs is amazing and so fast. I use it constantly every day and it's great!)

Also just for posterity, it's a 255 character limit on my system

seq(1, 500) %>% map(~{
  print(.)
  FN = paste0(rep("A", .), collapse="")
  fqsave(1, glue("/tmp/{FN}"))
})

@jzl from previous issue thread. Great idea, thanks!