Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Detect image location correctly #14

Closed
le717 opened this issue Jun 19, 2014 · 4 comments
Closed

Detect image location correctly #14

le717 opened this issue Jun 19, 2014 · 4 comments
Labels
Milestone

Comments

@le717
Copy link
Owner

le717 commented Jun 19, 2014

If an image is selected through the file browser and it resides in the same folder as the HTML file, the root folder name will be appended instead of just the image name, creating a 404 error.

@le717 le717 added this to the v1.2.0 milestone Jun 19, 2014
@le717 le717 added the bug label Jun 19, 2014
@le717 le717 changed the title Detect relative path correctly Detect image location correctly Jun 19, 2014
@le717 le717 mentioned this issue Jun 23, 2014
6 tasks
@le717
Copy link
Owner Author

le717 commented Jun 29, 2014

Oddly, I cannot recreate this bug anymore. Removing milestone and closing. If it comes back up, I'll reopen it.

For possible future reference, if this does come back up, the FileUtils.getBaseName() and FileUtils.getDirectoryPath() APIs should be good areas to look into for fixing this.

@le717 le717 closed this as completed Jun 29, 2014
@le717 le717 removed this from the v1.2.0 milestone Jun 29, 2014
@le717 le717 reopened this Jul 9, 2014
@le717
Copy link
Owner Author

le717 commented Jul 9, 2014

The bug came back. The folder structure for recreating this bug looks like so:

MySite
    Folder1
        index.html
        image.png
    Folder2
        index.html
        page.html

If I am editing index.html in Folder1 and I try to add the image in the same folder, the URL used for the image is Folder1/image.png instead of simply image.png.

This is caused by a called to ProjectManager.makeProjectRelativeIfPossible(), which needs to happen, but the process is not extended any further to check if the image resides in the same folder as the file being edited.

@le717 le717 added this to the v1.3.0 milestone Sep 3, 2014
le717 pushed a commit that referenced this issue Sep 3, 2014
le717 pushed a commit that referenced this issue Sep 4, 2014
@le717
Copy link
Owner Author

le717 commented Sep 4, 2014

This has hopefully been fixed by 1947008 and 5dcefe3, but it needs to be tested before I can mark it as resolved.

@le717
Copy link
Owner Author

le717 commented Sep 6, 2014

I think I can safely say this is fixed now. 😄

@le717 le717 closed this as completed Sep 6, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant