Upload to TER always transfers hidden or system files
When uploading an extension to TER all files and directories are uploaded to TER even if they are hidden or only used by system (e.g. Windows).
This diff provides an additional checkbox 'Exclude hidden files'. When this is set, hidden files or folders or files in hidden folders are excluded from upload.
Please check and forward ideas and comments.
The diff is against typo3/mod/tools/em/class.em_index.php
(issue imported from #M3961)
#9 Updated by Peter Russ over 13 years ago
Added support to exclude folders and files by extensions.
Therefore a general setup can be done in localconf.php. Further TSCONFIG on user base can be set:
Setup in localconf.php (Example)
Setup in User TSCONFIG (Example)
User TSCONFIG always overules general setting.
In this example excludePath is resetted and excludeExt is set to bak and sec
Attached 2 diff.
class.em_index.060804.org.diff is against fresh settup
class.em_index.060804.diff.diff is against diff provided Aug 03.
Please test and comment
#10 Updated by Peter Niederlag over 13 years ago
I am having some little(!) trouble cleanly testing the patch 'class.em_index.060804.org.diff' due to the following lines:
- * $Id: class.em_index.php,v 1.1 2006/08/01 12:04:25 pruss Exp $
+ * $Id: class.em_index.php,v 1.2 2006/08/03 11:33:04 pruss Exp $
These ^ ^ lines from the diff won't apply. Other than that: looks nice and I will test it now....
#14 Updated by Stefan Geith over 13 years ago
Maybe, we should include an optional paramter to
and modify class.em_index.php to use this
with paramters getAllFilesAndFoldersInPath(...,'.svn,CVS')
This works on my Installation;
I include the diff-File 'patch_em_dot_svn_cvs.patch' (just for testing)
#15 Updated by Stefan Geith over 13 years ago
There is a bug in the patch:
(in patch line 19) it must read
So that exludeDirs are also excluded in subdirectories
#17 Updated by Karsten Dambekalns over 13 years ago
I uploaded exclude-in-EM.patch which changes t3lib_div to make exclusion possible, adds two settings to config_default.php and changes the EM exclude the configured files when packaging stuff.
- do we need those two separate settings?
- how strong is the need for wildcards?
#18 Updated by Karsten Dambekalns over 13 years ago
I just did a test with the ADOdb extension. No files were missing that should have been there (i.e. only the .svn folders were gone). More interesting: the exported file was less than half in size, as SVN stores a local copy of the original for faster operation - so this isn't only about convenience!
#19 Updated by Michael Stucki over 13 years ago
One setting is enough, please merge them.
About wildcards: Yes these would probably be useful. Why not use a regular expression here?
The regex should search from the beginning (^) to till the end ($) of the strings. In this case the example below will filter all CVS directories, files beginning with a dot (hidden files) and temporary files (*~):
excludeForPackaging' => '(CVS|\..*|.*~)'
#20 Updated by Karsten Dambekalns over 13 years ago
Ok, I'll merge the settings.
On wildcards: Of course I thought about using regexp, but since this can be considered as user input, it should run through preg_quote(). Then this escapes all the magic stuff, of course, rendering this useless. Do we consider the localconf.php file trusted?
Obviously we do, just to make sure...