git.lucas.co / cce-files
file manager
git clone https://git.lucas.co/cce-files.git

commit127ad483ef3ab7fffbd74443c3e4210547224687
parent2f20afda1c
authorLucas Galante <[email protected]>
date2026-07-03 18:04
feat: recognize CCE projects as application/x-cce-project in get_mime_type

 src/services/fs.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/services/fs.rs b/src/services/fs.rs
index 0a72493..79b9a2a 100644
--- a/src/services/fs.rs
+++ b/src/services/fs.rs
@@ -387,6 +387,9 @@ pub fn save_last_dir_internal(dir: &Path) {
 }
 
 pub fn get_mime_type(path: &Path) -> Option<String> {
+    if path.is_dir() && path.join("state.json").exists() {
+        return Some("application/x-cce-project".to_string());
+    }
     if let Some(ext) = path.extension().and_then(|e| e.to_str()) {
         if ext.eq_ignore_ascii_case("kdl") {
             return Some("application/x-kdl".to_string());