Drop noisy 'Output path is outside the input file's directory tree' warning

Open Beginner friendly
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Find where resize and convert emit the “outside the input file's directory tree” warning, then read the surrounding path checks and their tests. Decide whether the warning should be removed or made conditional, as proposed; done means normal use of a separate output directory no longer floods the command output, with any retained security warning limited to suspicious paths.

Written by the indexing model from the issue text.

Description

Problem

When --output is a directory outside the input file's own folder, every resize and convert call prints:

Warning: Output path '/some/other/dir' is outside the input file's directory tree

Writing to a separate folder is the safe pattern. It is exactly what protects the source from the overwrite in #25. Warning on it trains users to ignore warnings, and in a batch loop it buries the real output. In one 24-photo run the warning printed well over 100 times.

Proposal

  • Remove this warning, or keep it behind --verbose.
  • If there is a security reason for it (path traversal from untrusted input?), say so in the message, and only warn when the path actually looks suspicious.
  • Consider a --quiet flag that suppresses everything except errors, for scripted use.

Context

ipro 1.7.0, macOS. Output dir was a scratch folder; input was on an external volume.

— Emily

Dominant language
Python
Stars
1
Forks
0
Avg merge
4h 13m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cadentdev/ipro

All issues in cadentdev/ipro

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.