java - JGit error when cloning repository -


bug won't fix. it's embedded how different operating systems allows characters in file names. solution cannot found within jgit or git @ moment.

when try run git.clonerepository() error syntax file-, directory name or volume lable. have started appear of sudden without change of code concerning piece of software.

jre: 1.7

code use:

private void clonecommit() throws exception {   try {     file minedir = new file(m_target, this.m_name);      if (!minedir.exists()) {       minedir.mkdir();       minedir.setwritable(true);       minedir.setexecutable(true);     }                     git g = null;      windowcacheconfig cfg = new windowcacheconfig();     cfg.setpackedgitmmap(false);     windowcache.reconfigure(cfg);      g = git.clonerepository()         .seturi(m_localuri)         .setdirectory(minedir)         .call();      g.reset().setref(this.m_current.getname()).setmode(resettype.hard).call();      globalmessages.commitpulled(this.m_i, this.m_current.getname());      g.getrepository().close();      m_runningthreads--;    } catch (exception e) {     errorhandlingmining(e, this.m_current);   } } 

error message:

org.eclipse.jgit.api.errors.jgitinternalexception: incorrect syntax file name, directory name or volume label   @ org.eclipse.jgit.api.clonecommand.call(clonecommand.java:130)   @ se.lnu.cs.doris.git.gitrepository$cloner.clonecommit(gitrepository.java:423)   @ se.lnu.cs.doris.git.gitrepository$cloner.guardedcloner(gitrepository.java:446)   @ se.lnu.cs.doris.git.gitrepository$cloner.run(gitrepository.java:440)   @ java.lang.thread.run(unknown source) caused by: java.io.ioexception: incorrect syntax file name, directory name or volume label   @ java.io.winntfilesystem.createfileexclusively(native method)   @ java.io.file.createtempfile(unknown source)   @ org.eclipse.jgit.dircache.dircachecheckout.checkoutentry(dircachecheckout.java:968)   @ org.eclipse.jgit.dircache.dircachecheckout.docheckout(dircachecheckout.java:457)   @ org.eclipse.jgit.dircache.dircachecheckout.checkout(dircachecheckout.java:391)   @ org.eclipse.jgit.api.clonecommand.checkout(clonecommand.java:229)   @ org.eclipse.jgit.api.clonecommand.call(clonecommand.java:127)   ... 4 more 

i don't understand problem is. i've tried correct skipping first if-clause, using minedir.createnewfile() etc. code worked superbly few days ago. suggestions?

from stack trace, error happens in checkout phase after repository has been cloned. in phase, files , folders recorded in head commit created in working directory.

so, there commit introduced file special characters in name? find out, @ history of cloned repository.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -