Skip to content

[Bug] Infinite compression loop when output directory is inside the monitored folder / 输出目录位于监听文件夹时导致无限重复压缩 #35

Description

@Overbye

Bug Description

English

When using PicSharp's folder monitoring feature, if the output directory is inside the monitored folder—or is the same directory—PicSharp detects the compressed files it just created and compresses them again.

This creates a loop:

Original image → PicSharp compresses it → A new image is created → The new image is detected → It is compressed again → …

The process keeps generating files and may quickly consume disk space and system resources.

No screenshot is attached because none is available in this report.

中文

使用 PicSharp 的“监听文件夹”自动压缩功能时,如果输出目录位于监听文件夹内部,或输出目录与监听目录相同,PicSharp 会继续监听并再次压缩自己刚刚生成的文件。

这会形成循环:

原始图片 → PicSharp 压缩 → 生成新图片 → 新图片再次被监听 → 再次压缩 → ……

程序会持续生成文件,并可能快速占用磁盘空间和系统资源。

本次反馈暂无对应截图。

Expected behavior

English

PicSharp should prevent this configuration, automatically exclude the output directory from folder monitoring, or ignore files generated by PicSharp so that they are not compressed repeatedly.

中文

PicSharp 应阻止这种目录配置,或自动将输出目录排除在监听范围之外,或忽略 PicSharp 自己生成的文件,以避免重复压缩。

Technical inputs

Operating System: Windows 11
PicSharp Version: v2.2.7
Feature: Folder monitoring / Output directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions