clang-tidy: readability-else-after-return
[geeqie.git] / src / filedata.cc
index c990c27..5e032c7 100644 (file)
@@ -332,7 +332,8 @@ static void file_data_set_path(FileData *fd, const gchar *path)
                file_data_set_collate_keys(fd);
                return;
                }
-       else if (strcmp(fd->name, ".") == 0)
+
+       if (strcmp(fd->name, ".") == 0)
                {
                g_free(fd->path);
                fd->path = remove_level_from_path(path);
@@ -2965,11 +2966,11 @@ static gboolean file_data_perform_delete(FileData *fd)
 {
        if (isdir(fd->path) && !islink(fd->path))
                return rmdir_utf8(fd->path);
-       else
-               if (options->file_ops.safe_delete_enable)
-                       return file_util_safe_unlink(fd->path);
-               else
-                       return unlink_file(fd->path);
+
+       if (options->file_ops.safe_delete_enable)
+               return file_util_safe_unlink(fd->path);
+
+       return unlink_file(fd->path);
 }
 
 gboolean file_data_perform_ci(FileData *fd)