Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix incorrect file permissions in file.line #30212
Looks like atomic_open() doesn't take care of preserving file permissions. It will create
Hope this one don't break anything :(
When atomic_open is called from the file module, the file always exists. However, when atomic_open() is called from returners, the file does not exist yet. Should atomic_open() make the assumption that the file exists? If yes, you should fix the calling code in salt/returners/local_cache.py and perhaps other places.
If atomic_open should NOT assume the file exists, I think it's a bit nicer to check if the file exists rather than simply swallowing exceptions. For example:
After all, you still want to know if something unexpected happens, and not silently continue.
In your previous version it was fine, but now it says "isfle". Look in your github repository on the fix_file_line_permissions branch:
If it's correct locally, maybe you can try to push the branch again?