瀏覽代碼

file delete : also allow to delete system and hidden files

Sylver Bruneau 9 年之前
父節點
當前提交
9b3a172c63
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/smb_file.c

+ 1 - 1
src/smb_file.c

@@ -263,7 +263,7 @@ uint32_t  smb_file_rm(smb_session *s, smb_tid tid, const char *path)
 
     SMB_MSG_INIT_PKT(req);
     req.wct               = 0x01; // Must be 1
-    req.search_attributes = SMB_ATTR_NORMAL;
+    req.search_attributes = SMB_ATTR_HIDDEN | SMB_ATTR_SYS;
     req.bct               = (uint16_t)(utf_pattern_len + 1);
     req.buffer_format     = 0x04; // Must be 4
     SMB_MSG_PUT_PKT(req_msg, req);