mirror of
https://github.com/go-gitea/gitea
synced 2025-07-09 20:17:21 +00:00
Keep file tree view icons consistent with icon theme (#33921)
Fix #33914 before:  after:  --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -17,16 +17,12 @@ const (
|
||||
// EntryModeNoEntry is possible if the file was added or removed in a commit. In the case of
|
||||
// added the base commit will not have the file in its tree so a mode of 0o000000 is used.
|
||||
EntryModeNoEntry EntryMode = 0o000000
|
||||
// EntryModeBlob
|
||||
EntryModeBlob EntryMode = 0o100644
|
||||
// EntryModeExec
|
||||
EntryModeExec EntryMode = 0o100755
|
||||
// EntryModeSymlink
|
||||
|
||||
EntryModeBlob EntryMode = 0o100644
|
||||
EntryModeExec EntryMode = 0o100755
|
||||
EntryModeSymlink EntryMode = 0o120000
|
||||
// EntryModeCommit
|
||||
EntryModeCommit EntryMode = 0o160000
|
||||
// EntryModeTree
|
||||
EntryModeTree EntryMode = 0o040000
|
||||
EntryModeCommit EntryMode = 0o160000
|
||||
EntryModeTree EntryMode = 0o040000
|
||||
)
|
||||
|
||||
// String converts an EntryMode to a string
|
||||
@ -34,12 +30,6 @@ func (e EntryMode) String() string {
|
||||
return strconv.FormatInt(int64(e), 8)
|
||||
}
|
||||
|
||||
// ToEntryMode converts a string to an EntryMode
|
||||
func ToEntryMode(value string) EntryMode {
|
||||
v, _ := strconv.ParseInt(value, 8, 32)
|
||||
return EntryMode(v)
|
||||
}
|
||||
|
||||
func ParseEntryMode(mode string) (EntryMode, error) {
|
||||
switch mode {
|
||||
case "000000":
|
||||
|
Reference in New Issue
Block a user