38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
From: Sankar P <psankar@novell.com>
|
|
Subject: fs: novfs: Return ENOTEMPTY when tyring to delete a non-empty folder
|
|
References: bnc#583964
|
|
Patch-mainline: no
|
|
|
|
The patch returns the ENOTEMPTY error code, when an user issues
|
|
delete command on a non-empty folder. This fix makes Nautilus
|
|
behave correctly in novfs, just like other file-systems.
|
|
|
|
Signed-off-by: Sankar P <psankar@novell.com>
|
|
Acked-by: Jan Kara <jack@suse.cz>
|
|
---
|
|
fs/novfs/file.c | 11 ++++++++---
|
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
--- a/fs/novfs/file.c
|
|
+++ b/fs/novfs/file.c
|
|
@@ -1569,11 +1569,16 @@ int novfs_delete(unsigned char * Path, i
|
|
if (reply) {
|
|
retCode = 0;
|
|
if (reply->Reply.ErrorCode) {
|
|
- if ((reply->Reply.ErrorCode & 0xFFFF) == 0x0006) { /* Access Denied Error */
|
|
+
|
|
+ /* Refer to the file ncp.c, in xtier's
|
|
+ * NCP89_08 Function for various error codes */
|
|
+
|
|
+ if ((reply->Reply.ErrorCode & 0xFFFF) == 0x0006)
|
|
retCode = -EACCES;
|
|
- } else {
|
|
+ else if ((reply->Reply.ErrorCode & 0xFFFF) == 0x0513)
|
|
+ retCode = -ENOTEMPTY;
|
|
+ else
|
|
retCode = -EIO;
|
|
- }
|
|
}
|
|
kfree(reply);
|
|
}
|