[PR #15960] Warn when image files are not found #77668

Open
opened 2026-05-05 10:20:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15960
Author: @ankit-songara
Created: 5/4/2026
Status: 🔄 Open

Base: mainHead: fix/image-path-warning


📝 Commits (1)

  • 810c442 fix: warn when image files are not found

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 cmd/interactive.go (+2 -0)

📄 Description

Fixes #10333

Problem

When dragging image files into the CLI with paths containing special characters or escaped sequences, the normalized path might not match the actual file location. Ollama silently skips these files without any feedback, leaving users confused.

Solution

Add warning message that shows:- Original path from user input- Normalized path that was attempted

This helps users debug path issues and understand why their images weren't included.

Changes

  • Modified extractFileData() in cmd/interactive.go- When os.ErrNotExist, print warning instead of silent continue

Testing

Drag images with escaped paths (spaces, special chars) and verify warning appears in stderr


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/15960 **Author:** [@ankit-songara](https://github.com/ankit-songara) **Created:** 5/4/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/image-path-warning` --- ### 📝 Commits (1) - [`810c442`](https://github.com/ollama/ollama/commit/810c442a03f9ac9de7d9f15cd1b345ff1b191324) fix: warn when image files are not found ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/interactive.go` (+2 -0) </details> ### 📄 Description Fixes #10333 ## Problem When dragging image files into the CLI with paths containing special characters or escaped sequences, the normalized path might not match the actual file location. Ollama silently skips these files without any feedback, leaving users confused. ## Solution Add warning message that shows:- Original path from user input- Normalized path that was attempted This helps users debug path issues and understand why their images weren't included. ## Changes - Modified extractFileData() in cmd/interactive.go- When os.ErrNotExist, print warning instead of silent continue ## Testing Drag images with escaped paths (spaces, special chars) and verify warning appears in stderr --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 10:20:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#77668