azachar/eclipse-plugin-cleaner

Not working on Windows (Fix by using System path separators)

Closed this issue · 7 comments

Will check the errors tonight and send you the fix.
meanwhile:

C:\shared\tools\eclipse-new>java -jar plugin-cleaner-0.1.0-SNAPSHOT-jar-with-dep
endencies.jar -t
←[34mWelcome to Eclipse Plugin Cleaner 0.1.0-SNAPSHOT (c) 2014 Chocolate Jar←[0;
39m
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:>
at index 54: C:\shared\tools\eclipse-new.\duplicates_Wed Mar 05 14:59:59 EST 2
014\plugins
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at eu.chocolatejar.eclipse.plugin.cleaner.Cleaner.doCleanUpFor(Cleaner.j
ava:83)
at eu.chocolatejar.eclipse.plugin.cleaner.Cleaner.doCleanUp(Cleaner.java
:73)
at eu.chocolatejar.eclipse.plugin.cleaner.Main.main(Main.java:55)

C:\shared\tools\eclipse-new>

Hi Rouche!
Thank you for your message!
The fix was quite easy, I am committing it. Please let me known if the problem still persists.

Cheers,
Andrej

Wow that was fast.

I was working with it a bit, just another idea, for destionFolder :

String sourceParam = getParam("source", ".");
File sourceFolder = new File(sourceParam);
String destStart = StringUtils.isNotBlank(sourceParam) ? sourceParam : ".";
File destionFolder = new File(getParam("destination", destStart + "/duplicates_" + new Date()));

I like it Rouche, I made some changes to reflect your proposal.
Let me know if you like it.

Hello,

Yep thats cool.

The error message dont need to be output either for destination folder
since FileUtils do a mkDirs().

There seems to be a File not released / locked. After executing it my
eclipse-new folder is locked (caint rename)

Except than that. Everything seems good. I got my fresh new eclipse.

Good work!
Thanks :)

JF

On Wed, Mar 5, 2014 at 8:56 PM, Andrej Zachar notifications@github.comwrote:

I like it Rouche, I made some changes to reflect your proposal.
Let me know if you like it.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-36817222
.

Hello Jean,
nice to hear that it helped you!
In the mean time I have improved several application messages.
I hope it would a bit be better now, please check the brand new version at https://github.com/azachar/eclipse-plugin-cleaner/releases/tag/v0.2.0

I look forward for your feedback.

PS: I try to check file streams closing if your folder still remains locked.

Best regards,
Andrej

PS: Also I have refactored the repository so if you want to do any coding, drop your old master and check out brand new one. The old master is located in branch master-deprecated.

Thanks.

For now tough i have to return to normal work :)

On Thu, Mar 6, 2014 at 12:52 PM, Andrej Zachar notifications@github.comwrote:

PS: Also I have refactored the repository so if you want to do any coding,
drop your old master and check out brand new one. The old master is located
in branch master-deprecated.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-36915758
.