When edited files are temporarily saved off the file permissions are copied onto the temp file as well. If the original file was read-only the temp file can no longer be deleted (and the original file can't be written to, but this was happening first).
Since I'm using Perforce for source control and files are read-only until explicitly checked out this results in a bunch of *.tmp files cluttering up my project. The following is also spit out:
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublimeplugin.py", line 543, in run
return self.run(edit, **args)
File "C:\Users\CheEsus\AppData\Roaming\Sublime Text 3\Packages\Haxe\HaxeComplete.py", line 414, in run
comps, hints = complete.get_haxe_completions( self.view , r.end() )
File "C:\Users\CheEsus\AppData\Roaming\Sublime Text 3\Packages\Haxe\HaxeComplete.py", line 1914, in get_haxe_completions
temp = self.save_temp_file( view )
File "C:\Users\CheEsus\AppData\Roaming\Sublime Text 3\Packages\Haxe\HaxeComplete.py", line 1790, in save_temp_file
shutil.copy2( fn , temp )
File "./shutil.py", line 243, in copy2
File "./shutil.py", line 110, in copyfile
PermissionError: [Errno 13] Permission denied: 'C:\Users\CheEsus\Perforce\TestTest\source\PlayState.hx.tmp'
When edited files are temporarily saved off the file permissions are copied onto the temp file as well. If the original file was read-only the temp file can no longer be deleted (and the original file can't be written to, but this was happening first).
Since I'm using Perforce for source control and files are read-only until explicitly checked out this results in a bunch of *.tmp files cluttering up my project. The following is also spit out: