| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this code just assumed it is capable of changing the file
ownership, both user and group. This will fail in a lot of scenario's
unless:
* The process is run as a superuser (root);
* The owning user and group are already set to the user and group we're
trying to chown to;
* The user chown'ing only changes the group to another group it is a
member of.
If either of those conditions are not met the filesystem will simply
deny the operation throwing an error.
It is also not always possible to do a chmod, there might be a SELinux
policy or another limitation preventing the user to change the file
mode. To this end the chmod call has also been added to the rescue
block.
I've also added a little comment above the chmod command that doing a
chmod on a file which has an ACL set will cause the ACL to be
recalculated / modified.
|
|
|
|
|
|
|
|
|
|
|
| |
It was noticed while profiling 'assets:precompile' in JRuby that
exception creation was consuming a large portion of time, and
some of that was due to File.atomic_write.
Testing first with File.exists? eliminates the need for an exception
which should be a perfomrance improvement on both JRuby and MRI.
In this case, the stat() isn't even extra overhead, since it is always
called.
|
|
|
|
|
|
|
| |
The revised test assumed that the default permissions of a file
matched the umask of the process, but in the general case that
depends also on the file system. This test was failing in the
/vagrant shared folder of Rails development boxes.
|
| |
|
| |
|
| |
|
|
|
|
| |
Binary mode window bug
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Convert some extension modules to simply reopening the class
* Remove deprecated Float time extensions
* Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone
|
|
|
|
|
| |
root [#1962 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
| |
|
|
|
|
| |
[#1035 state:committed]
|
|
default.
|