'.Rproj.user' temp file names too long for Windows. Is it possible to change location?

I've run into this issue a couple times now when running R Projects from within my company's sharepoint. I get the following error:

Warning in gzfile(file, "wb") :
cannot open compressed file 'C:/Users/username/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyy/zzzz/FOLDER1/FOLDER2/RProjectFolderName/.Rproj.user/shared/notebooks/2A307FFB-R NOTEBOOK FILENAME/1/577A64751678040F/com0tlkub4ehu_t/ab3dec16c44d4956a4ed96ae4edb4519.snapshot', probable reason 'No such file or directory'
Error in gzfile(file, "wb") : cannot open the connection

From everything I can tell, this issues has to do with Window's limit on filepaths to 260 characters. So, Is it possible to either limit the length of these '.Rproj.user' temp file names or change the location of the temporary directory to somewhere else (e.g. my local machine)? Thank you.

I am using RStudio v1.1.453.

2 Likes