[go: up one dir, main page]

Batch export fails with "Can not save to a directory that is actually a file" when relative directory does not exist

Summary:

Batch exporting pages with inkscape:export-batch-path set to a relative path that does not exist results in this unclear error message. I think I fixed it in chraab/inkscape@6a294a91 but should be discussed more of course 😃

Steps to reproduce:

  • create a file, possibly do some batch exports.
  • move it.
  • open the file at the new location. It contains an attribute inkscape:export-batch-path="./fake_directory". Obviously I changed the directory name, but the fact that it was a relative path was written by Inkscape itself.
  • export, batch export, pages
  • click export

What happened?

error message "Can not save to a directory that is actually a file"

What should have happened?

An error message saying something to the effect of "Export directory does not exist".

Other ways to handle this would be an indication before export, offering to create the directory, or offering to adjust the relative export-batch-path to match an existing directory; but these go more into "feature request" territory. I understand having relative paths rather than absolute is a net benefit for portability of a project.

Sample attachments:

export_bug.svg

Version info


Inkscape 1.4 (1:1.4+202410161351+e7c3feb100)

                      Compile  (Run)
    GLib version:     2.72.4
    GTK version:      3.24.33 (3.24.33)
    glibmm version:   2.66.2
    gtkmm version:    3.24.5
    libxml2 version:  2.9.13
    libxslt version:  1.1.34
    Cairo version:    1.16.0 (1.16.0)
    Pango version:    1.50.6 (1.50.6)
    HarfBuzz version: 2.7.4 (2.7.4)

    OS version:       Ubuntu 22.04.5 LTS
Edited by Chris Ra