Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Invalid Path Problem

On 11/08/2012 09:48 AM, Markus Duft wrote:
> oh:
> 
> if (isWindows) {
> 			// Space or period at end of file name is ignored by Windows.
> 			// Treat this as a bad path for now. We may want to handle
> 			// this as case insensitivity in the future.
> 
> ... but this is only true in explorer, but not filesystem wise, is it?


IMHO it is a /bad/ idea to do checks based on operating system. if period is not allowed at the end of path, then please could we prohibit this on all platforms? we now have a repo which works on linux, but is broken on windows (at least with JGit).... opinions?

Markus

> 
> On 11/08/2012 09:46 AM, Markus Duft wrote:
>> Hey!
>>
>> Today we got an unclonable repository, since somebody manage to checking a directory "com.wamas.wms.mobile.core.client." (notice the period) instead of "com.wamas.wms.mobile.core.client". We cannot clone and/or create a new branch from origin/master after this appeared in the repo. With the CLI this works.
>>
>> Ideas? isValidPath() seems to check some with "." in paths, something wrong?
>>
>> Error while cloning repository
>>
>> java.lang.RuntimeException: org.eclipse.jgit.dircache.InvalidPathException: Invalid path: com.wamas.wms.mobile.core.client.
>>        at com.wamas.ide.git.GitRepositoryUtils.cloneRepository(GitRepositoryUtils.java:231)
>>        at com.wamas.ide.git.ui.CloneRepositoryDialog$3.run(CloneRepositoryDialog.java:155)
>>        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>> Caused by: org.eclipse.jgit.dircache.InvalidPathException: Invalid path: com.wamas.wms.mobile.core.client.
>>        at org.eclipse.jgit.dircache.DirCacheCheckout.processEntry(DirCacheCheckout.java:310)
>>        at org.eclipse.jgit.dircache.DirCacheCheckout.prescanOneTree(DirCacheCheckout.java:288)
>>        at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:407)
>>        at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:391)
>>        at org.eclipse.jgit.api.CloneCommand.checkout(CloneCommand.java:229)
>>        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:127)
>>        at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:155)
>>        at com.wamas.ide.git.GitRepositoryUtils.cloneRepository(GitRepositoryUtils.java:229)
>>        ... 2 more
>>
>> Markus
>>
>> _______________________________________________
>> jgit-dev mailing list
>> jgit-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jgit-dev
>>
> _______________________________________________
> jgit-dev mailing list
> jgit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jgit-dev
> 


Back to the top