summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2023-04-11 16:20:13 -0700
committerCorey Berla <corey@berla.me>2023-04-11 16:20:13 -0700
commit6f915a03ba39f2f68dcd2873fcf93e59d87f690a (patch)
treef8023f704c705233b0a94a78e8c1ca94bb94540b
parentf99b812d16d29f9fa6dd090f4ccb6058c004e012 (diff)
downloadgvfs-6f915a03ba39f2f68dcd2873fcf93e59d87f690a.tar.gz
Revert "smb: Allow renaming a file to the same name with a different case"
This reverts commit f99b812d16d29f9fa6dd090f4ccb6058c004e012.
-rw-r--r--daemon/gvfsbackendsmb.c9
1 files changed, 1 insertions, 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,