This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231934 - Relative paths in libraries not preserved
Summary: Relative paths in libraries not preserved
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 232124 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-27 13:51 UTC by Tomas Mysik
Modified: 2013-07-02 22:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2013-06-27 13:51:19 UTC
If any JS library contains any directory structure (e.g. "aui" library [1], it contains many folders), this structure is removed and all files are put into one directory. The problems are that:
(a) relative paths in CSS files do not work,
(b) files with same names can be overriden (in fact they cannot because IO exception is thrown).

Thanks.
[1] One must update JS libs to get it to the list of available libraries.

Product Version: NetBeans IDE Dev (Build 20130627-647a62e1a36a)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.8.0-25-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Tomas Mysik 2013-06-27 14:10:10 UTC
Fixed.

http://hg.netbeans.org/web-main/rev/7f91fb9ce2c0
Comment 2 David Konecny 2013-06-27 21:14:00 UTC
I'm testing this before your fix on aui library and everything works OK. I had a look at the fix and it does not make sense to me: getDestinationFolder is the method which re-creates relative directory structure. And your fix seems to be doing the same.....(unless of course PROPERTY_FILES_ROOT is null - that would explain it. I'm guessing you can reproduce this problem only after fixing 228876.)
Comment 3 David Konecny 2013-06-27 22:01:17 UTC
The problem was somewhere else - WebUtils.urlToString did not handle jar URLs correctly. I fixed that f4c93c91335c and backed out your original fix 29fbe09c4032.
Comment 4 Quality Engineering 2013-06-28 02:18:06 UTC
Integrated into 'main-silver', will be available in build *201306272300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7f91fb9ce2c0
User: Tomas Mysik <tmysik@netbeans.org>
Log: #231934 - Relative paths in libraries not preserved
Comment 5 Tomas Mysik 2013-06-28 05:05:39 UTC
I will have a look at it, thanks.
Comment 6 Tomas Mysik 2013-06-28 05:49:39 UTC
Sorry, I overlooked getDestinationFolder() method, it is quite new there :)

However, the file paths in the UI were still incorrect (select "aui" library in JS Files panel - only pure file names are there since getLibraryFilePath() uses lastIndexOf('/')) so the validation fails on it. I have fixed that.

Thanks.

http://hg.netbeans.org/web-main/rev/c437f4f29389
Comment 7 David Konecny 2013-07-01 01:06:24 UTC
> However, the file paths in the UI were still incorrect

True. I did no check those. Thanks. It is quite weird actually to list all library filenames next to each other for libraries which have dozen or more files. Would not it be better to show simply something like "aui (15 files)"?
Comment 8 Tomas Mysik 2013-07-01 05:09:24 UTC
Reported as issue #232052.

Thanks.
Comment 9 Quality Engineering 2013-07-01 15:59:11 UTC
Integrated into 'main-silver', will be available in build *201307011244* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f4c93c91335c
User: David Konecny <dkonecny@netbeans.org>
Log: #231934 - Relative paths in libraries not preserved
Comment 10 David Konecny 2013-07-02 22:06:48 UTC
*** Bug 232124 has been marked as a duplicate of this bug. ***