mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-04-26 19:05:54 +03:00
[GH-ISSUE #443] Can't Rename Directories when allowed_file_extensions is set #325
Labels
No labels
Feature
Feature
Is It Really an Issue?
Need More Info
Request
Security
bug
duplicate
enhancement
enhancement
help wanted
invalid
pull-request
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tinyfilemanager#325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jsn081 on GitHub (Oct 29, 2020).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/443
As of 2.4.5-dev, if I set allowed file extensions in $allowed_file_extensions I am prevented from renaming directories. The rename function is the same for files and directories, and renaming a directory fails the file extensions check. Either directory renaming needs to be handled separately (which is a good idea so I can prevent .hidden directories), or the rename function needs to check if the thing being renamed is a directory, and if it is bypass the extension check.
I was going to slap something together myself, but the fm_rename function doesn't get the path passed to it, so it required more thought and sanity checking than I was willing to trust myself with.