Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute paths don't work anymore #3212

Closed
Svarov-RZM opened this issue Sep 12, 2023 · 7 comments · Fixed by #3214
Closed

Absolute paths don't work anymore #3212

Svarov-RZM opened this issue Sep 12, 2023 · 7 comments · Fixed by #3214

Comments

@Svarov-RZM
Copy link
Contributor

Describe the bug
After Preview window got fixed, there's a bigger problem that was lying underneath. Synfig can no longer import external resources (images, sounds) by their absolute paths. Why would you need to use absolute paths instead of relative? Because on Windows, you can have multiple disks: C:, D:, E:, etc. And if your external resources are located on a different disk than your project file, you can no longer use relative paths. So, this is a Windows-specific bug.

To Reproduce

  1. Place an external resource (a sound or a picture, not important) on a different drive than C:. If you have only one drive, plug in a flash drive
  2. In empty canvas, Menu->File->Import...
  3. Select your external resource and see that its "Filename" parameter is empty

Expected behavior
Being able to import resources from different drives.

System information:

  • OS: Windows 10, x86-64
  • Commit ID: fb11ad2
@rodolforg
Copy link
Contributor

rodolforg commented Sep 12, 2023

Svarov, just for checking: the top commit ID is fb11ad2 , not 7040b7f , right?

And it's absolute path the issue, not non-latin characters, right?

@ice0
Copy link
Collaborator

ice0 commented Sep 12, 2023

And it's absolute path the issue, not non-latin characters, right?

I can't reproduce with any of this commits.
But with non-latin characters it didn't import, yes.

UPD:
It was an issue with the jpg file, not with non-latin characters.

Demo for 7040b7f

file-test-windows2.mp4

@Svarov-RZM
Copy link
Contributor Author

Svarov, just for checking: the top commit ID is fb11ad2 , not 7040b7f , right?

Right.

And it's absolute path the issue, not non-latin characters, right?

Also right.

Hm, maybe the problem in my custom patches...
Please hang on. I'll rebuild Synfig with the latest commits and without my patches and will get back to you (probably on weekends).

rodolforg added a commit to rodolforg/synfig that referenced this issue Sep 13, 2023
and implements missing lexically_proximate(), that actually do what
old ETL relative() did.
relative() returns empty path if path isn't relative to base path.

fix synfig#3212
@Svarov-RZM
Copy link
Contributor Author

Tested with clean build, issue persists.

@ice0
You have to save your file in order to reproduce the issue.
Sorry, my mistake, I didn't specify that in my original post, was writing it before heading to work. So, actual steps to reproduce the problem:

  1. In empty canvas, Menu->File->Import...
  2. Select a png picture from another drive
  3. You can actually see the picture being imported properly, save you work
  4. Restart Synfig and open the saved file, the imported picture is no longer visible
  5. Try to import another image, it won't even show up on canvas this time

@rodolforg
Thanks for diving into the problem!
I see your commit, will test it tomorrow and see if problem is still there.

@rodolforg
Copy link
Contributor

rodolforg commented Sep 14, 2023

@rodolforg
Thanks for diving into the problem!

Oh well... That's probably my fault. lol

@Svarov-RZM
Copy link
Contributor Author

Oh well... That's probably my fault. lol

Not fault, minor setback :)
I tested the linked commit and everything works as expected now. Thanks again. Feel free to close the issue after merging.

P.S. ice0 mentioned the other bug about "The folder contents could not be displayed" message, but I feel like it belongs in a separate issue.

rodolforg added a commit to rodolforg/synfig that referenced this issue Sep 23, 2023
and implements missing lexically_proximate(), that actually do what
old ETL relative() did.
relative() returns empty path if path isn't relative to base path.

fix synfig#3212
@rodolforg
Copy link
Contributor

P.S. ice0 mentioned the other bug about "The folder contents could not be displayed" message, but I feel like it belongs in a separate issue.

I suppose I fixed in the last commit of that same PR ;)

rodolforg added a commit to rodolforg/synfig that referenced this issue Sep 26, 2023
and implements missing lexically_proximate(), that actually do what
old ETL relative() did.
relative() returns empty path if path isn't relative to base path.

fix synfig#3212
rodolforg added a commit to rodolforg/synfig that referenced this issue Sep 27, 2023
and implements missing lexically_proximate(), that actually do what
old ETL relative() did.
relative() returns empty path if path isn't relative to base path.

fix synfig#3212
@ice0 ice0 mentioned this issue Nov 27, 2023
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants