From 6f915a03ba39f2f68dcd2873fcf93e59d87f690a Mon Sep 17 00:00:00 2001 From: Corey Berla Date: Tue, 11 Apr 2023 16:20:13 -0700 Subject: Revert "smb: Allow renaming a file to the same name with a different case" This reverts commit f99b812d16d29f9fa6dd090f4ccb6058c004e012. --- daemon/gvfsbackendsmb.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c index 64882c16..d999a2a6 100644 --- a/daemon/gvfsbackendsmb.c +++ b/daemon/gvfsbackendsmb.c @@ -1892,8 +1892,6 @@ do_set_display_name (GVfsBackend *backend, { GVfsBackendSmb *op_backend = G_VFS_BACKEND_SMB (backend); char *from_uri, *to_uri; - g_autofree char *from_uri_case = NULL; - g_autofree char *to_uri_case = NULL; char *dirname, *new_path; int res, errsv; struct stat st; @@ -1918,12 +1916,7 @@ do_set_display_name (GVfsBackend *backend, */ smbc_stat = smbc_getFunctionStat (op_backend->smb_context); res = smbc_stat (op_backend->smb_context, to_uri, &st); - /* But still allow renaming if the existing file is the original file. - * In other words if the case is changing. - */ - from_uri_case = g_utf8_casefold (from_uri, -1); - to_uri_case = g_utf8_casefold (to_uri, -1); - if (res == 0 && g_strcmp0 (from_uri_case, to_uri_case) != 0) + if (res == 0) { g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR, G_IO_ERROR_EXISTS, -- cgit v1.2.1