User tests: Successful: Unsuccessful:
Pull Request for Issue # .
build/media_source to mediamkdir to use mode: 0o755writeFile to use mode: 0o644 and also encoding: 'utf8'The timestamp flag is documented here: https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy.md
The flags mode and encoding for writeFile: https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options
The flags recursive and mode for mkdir: https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options
Check that ALL files are still generated and with correct timestamps and mode
No
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Repository |
| Labels |
Added:
?
|
||
| Labels |
Added:
?
Removed: ? |
||
@dgrammatiko Don't forget to adjust title and description to all changes when done with coding ;-)
@dgrammatiko Don't forget to adjust title and description to all changes when done with coding ;-)
I Will do it in a bit, running some tests right now, so this is not really ready for testing yet
Default encoding for writeFile is uft8, so you shouldn't need to manually define it
so you shouldn't need to manually define it
It was more or less a find and replace, also the code is not going to be served on a browser so the extra bytes are not really harmful here. Anyways I've switched tasks so @C-Lodder if you pr the changes I will apply them
Is this ready to test @dgrammatiko ?
Is this ready to test @dgrammatiko ?
yup
| Status | Pending | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-23 18:36:37 |
| Closed_By | ⇒ | wilsonge | |
| Labels |
Added:
?
Removed: ? |
||
Thanks!
I have tested this item✅ successfully on 567253f
Code review: According to https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy.md we should use the preserveTimestamps parameter to be sure timestamps of copied files are preserved because the default is false.
Real test: After an "npm ci" wihout this PR applied, all time stamps of files which just have copied from build/media_source to media (or folders below) have changed their time stamp. With the PR applied the timestamps are preserved. Comparing build/media_source and media folder structures with a good comparison tool like e.g. BeyondCompare shows that within a second.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35310.