This repository was archived by the owner on Sep 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +15
-4
lines changed
Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ allow_delete = [
2+ ' ServerScriptService' ,
3+ ' ServerStorage' ,
4+ ' ReplicatedStorage' ,
5+ ' StarterPlayer' ,
6+ ]
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -31,12 +31,15 @@ pub fn map_tree(tree: Vec<FileTree>) -> String {
3131
3232 for i in tree {
3333 if let FileTree :: File ( path, content) = i {
34- let ( name, _ ) = (
35- path. file_stem ( ) . expect ( "Failed to get file_name" ) . to_str ( ) . unwrap ( ) ,
34+ let ( mut name, extension ) = (
35+ path. file_stem ( ) . expect ( "Failed to get file_name" ) . to_str ( ) . unwrap ( ) . to_string ( ) ,
3636 path. extension ( ) . expect ( "Failed to get extension!" )
3737 ) ;
3838
39- file_structure. insert ( format ! ( "{name}" ) , content) ;
39+ if extension == "toml" || extension == "json" {
40+ name = format ! ( "{name}.json" ) ;
41+ }
42+ file_structure. insert ( name, content) ;
4043 } else if let FileTree :: Directory ( path, files) = i {
4144 let new_path = path. to_string_lossy ( ) ;
4245 let game_index = new_path. find ( "game" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ pub async fn post(body: String) -> impl Responder {
1616 . body (
1717 map_tree ( filesystem:: get_game_files ( ) )
1818 )
19+ } else if data[ 0 ] == "__DELETED__" {
20+ println ! ( "{} was just deleted!!!" , data[ 1 ] . to_string( ) . red( ) ) ;
1921 }
20- HttpResponse :: Ok ( ) . body ( "Hello" )
22+ HttpResponse :: Ok ( ) . body ( "{ Hello} " )
2123}
You can’t perform that action at this time.
0 commit comments