mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
make shared object distinguishable from executable files in getFileType and file
This commit is contained in:
parent
129c6ff315
commit
0a9e229841
2 changed files with 13 additions and 2 deletions
|
|
@ -747,6 +747,9 @@ Options:
|
|||
case stdio.types.FT_IMAGE:
|
||||
txt += 'Image';
|
||||
break;
|
||||
case stdio.types.FT_LIBRARY:
|
||||
txt += 'Shared Object';
|
||||
break;
|
||||
default:
|
||||
txt += 'Unknown Data';
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1566,6 +1566,7 @@ clite.io = {
|
|||
// 6: unloaded remote file
|
||||
// 7: shell script
|
||||
// 8: image
|
||||
// 9: shared object (library)
|
||||
types:{
|
||||
FT_UNKOWN:0,
|
||||
FT_TEXT:1,
|
||||
|
|
@ -1575,7 +1576,8 @@ clite.io = {
|
|||
FT_DEV:5,
|
||||
FT_REMOTE:6,
|
||||
FT_SCRIPT:7,
|
||||
FT_IMAGE:8
|
||||
FT_IMAGE:8,
|
||||
FT_LIBRARY:9
|
||||
},
|
||||
creat:null,
|
||||
open:null,
|
||||
|
|
@ -2180,7 +2182,13 @@ clite.lib = {
|
|||
return clite.io.types.FT_TEXT;
|
||||
break;
|
||||
case 'function': // executable
|
||||
return clite.io.types.FT_BINARY;
|
||||
if (fd.node.data.content.length == 2) {
|
||||
return clite.io.types.FT_LIBRARY;
|
||||
}else if (fd.node.data.content.length == 3) {
|
||||
return clite.io.types.FT_BINARY;
|
||||
}else{
|
||||
return clite.io.types.FT_UNKOWN;
|
||||
}
|
||||
break;
|
||||
case 'object':
|
||||
if (Array.isArray(fd.node.data.content)) // directory
|
||||
|
|
|
|||
Loading…
Reference in a new issue