Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With more people using subversion for version control, drupal should not by default recurse into subversion working base directories, just like it does not recurse into CVS directories. simpletest complained about redeclaring ogpost when I tried to start it.
Comment | File | Size | Author |
---|---|---|---|
#8 | file_omit_hidden_0.patch | 1009 bytes | ChrisKennedy |
#3 | file_omit_hidden.patch | 1.65 KB | ChrisKennedy |
file.inc_7.patch | 832 bytes | traxer | |
Comments
Comment #1
ChrisKennedy CreditAttribution: ChrisKennedy commentedWhat about modifying file_scan_directory so that it doesn't traverse any directories beginning with a period?
Comment #2
Dries CreditAttribution: Dries commentedIf we add .svn, we might as well want to add .darcs. :)
Comment #3
ChrisKennedy CreditAttribution: ChrisKennedy commentedAttached patch adds $omit_hidden as the final parameter to file_scan_directory(), defaulting to TRUE, in which case it ignores all files/directories beginning with a period. Modules that want to store data in hidden directories/files can set the flag to FALSE.
This would also fix hidden files with ._ prefix show on module list.
Comment #4
Allie MickaGreat big +1 on hiding .* files.
Is there a compelling reason to add the $omit_hidden flag? I can't think of a viable use case for wanting to see files that are supposed to be hidden?
Comment #5
ChrisKennedy CreditAttribution: ChrisKennedy commentedIt seems possible that a module would want to keep security-related information in a hidden file, or to keep temporary files in a hidden directory. But removing the flag is also fine with me if that level of customization isn't needed.
Comment #6
dman CreditAttribution: dman commentedI already tweaked it to do so (skip .directories) for my filebrowser extensions work.
Did so by changing the default exclusion pattern. You can overr-ride it by explicitly giving a blank exclusion pattern
Comment #7
Dries CreditAttribution: Dries commented-1 on the extra parameter. Why can probably always hide these.
Comment #8
ChrisKennedy CreditAttribution: ChrisKennedy commentedSounds good - I only added the parameter because I thought it would get more complaints otherwise. Here is the revised patch.
Comment #9
ChrisKennedy CreditAttribution: ChrisKennedy commentedI just realized that the $omit_hidden patch neglected to pass omit_hidden to recursive calls, so we averted a problem anyway.
Comment #10
Dries CreditAttribution: Dries commentedExtended the documentation a little and committed the patch to CVS HEAD.
Comment #11
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedbackported
Comment #12
(not verified) CreditAttribution: commented