Search Unity

Feedback Stop deleting the temp folder

Discussion in 'Editor & General Support' started by JohnnyFactor, Jun 24, 2020.

  1. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    Deleting the Temp folder is causing Dropbox to go crazy because it keeps getting removed and recreated. It's also causing endless file locking problems in the editor. Instead of deleting the Temp folder when closing the editor, leave the directory in place and just delete the contents.

    Another advantage of not deleting the Temp directory is it can be turned into a symlink, allowing temp files to be stored in another location or on another drive. I'm currently doing this with the Library directory and it works great.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Do not place your project folder in Dropbox. It handles resolution of conflicting changes in a way Unity cannot handle, by making duplicates of files with new names instead of combining the changes (or simply asking which you want to keep). This results in a disaster for your project.
     
    karl_jones and Lurking-Ninja like this.
  3. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    I've successfully been using Dropbox with Unity projects on macos for years with no problems, so don't tell me it can't be done. If the Temp directory is left in place, then I can run the command below and Dropbox will ignore it altogether and problem solved. I can't do that if the directory keeps getting deleted.

    Set-Content -Path 'C:\Users\<USER>\Dropbox\<PROJECT>\Temp' -Stream com.dropbox.ignored -Value 1
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Who said it "can't be done"?
     
  5. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    You did just now by trying to shut this idea down. Dropbox is a perfectly viable way of working and with the addition of command line options, it can be customized.

    All I'm asking is to not delete the Temp directory. That's it.
     
  6. lamtacla

    lamtacla

    Joined:
    Mar 31, 2019
    Posts:
    12
    Same problem. But you can prevent Unity delete Temp folder by create an empty text file in it. Then right click to text file / properties / securities, and set permission DENY everything to everyone. This make Unity cannot delete the temp folder because this textfile in it.
     
    Starbox likes this.