Commit graph

24 commits

Author SHA1 Message Date
Mark Pariente
d1d14bea35 Handle race in EncFSLocalFileProvider.listFiles()
It's possible for the source directory to be deleted after the
isDirectory() check but before the File.listFiles() call, so we should
handle this case by throwing an exception.
2013-10-24 00:31:58 -07:00
Mark Pariente
716555ab51 Fix formatting 2013-02-22 21:04:17 -08:00
Lars Gohlke
43a8b748cf more cleanups 2013-02-18 00:21:43 +01:00
Lars Gohlke
eabe5b5902 cleanup many inspection things 2013-02-17 23:51:59 +01:00
Lars Gohlke
24eb9121e2 reformatted all 2013-02-17 17:18:14 +01:00
Lars Gohlke
82150ae423 removed @throws javadocs 2013-02-17 17:16:20 +01:00
Lars Gohlke
a8566ff42b cleanup EncFSFileProvider.java 2013-02-17 16:06:36 +01:00
Lars Gohlke
0ccb480b13 Revert "reformatted code"
This reverts commit 23c1e5d78c.
2013-02-17 13:57:37 +01:00
Lars Gohlke
23c1e5d78c reformatted code 2013-02-17 13:39:27 +01:00
Mark Pariente
09c7dcebc4 Fix crash in EncFSLocalFileProvider.listFiles()
Handle the case where the given path is not a directory by throwing an
IOException. Previously this would result in a NullPointerException.
2012-12-27 15:14:45 -05:00
Mark Pariente
b18c762bcb Recursively delete directories in EncFSLocalFileProvider
EncFSLocalFileProvider.delete() was only deleting a directory if it was
completely empty. It is more functional to just recursively delete
everything under a directory if its not empty.
2012-09-16 19:41:23 -07:00
Mark Pariente
83cf5d0d2d Fix CRLF usage
Unfortunate to have to do this, but with the new version of git diff
explicitly showing CRLF as ^M this was starting to get annoying. We
shall use Unix newline style in encfs-java going forward.
2012-08-22 23:08:00 -07:00
Mark Pariente
7a370eb704 Make EncFSFileOutputStream take a length parameter
Unfortunately some network storage systems such as Dropbox require
length of the file before opening an upload request so we need to
plumb file length all throughout the OutputStream creation. It is
optional for EncFSLocalFileProvider, but it is good practice to
supply this parameter whenever possible.
2012-05-24 20:21:31 -07:00
Mark Pariente
412d62e2e9 Remove stale code from EncFSLocalFileProvider
This code was causing double leading slashes in front of directories
and did not have any noticable benefits, tests pass without it.
2012-05-21 02:12:02 -07:00
Mark Pariente
afea85bf68 Implement EncFSFileProvider.getRootPath() 2012-04-28 01:49:21 -07:00
Mark Pariente
c50de9fdd3 Implement separator interface for EncFSFileProvider 2012-04-28 01:39:33 -07:00
Mark Pariente
dba45202f8 Don't produce // as parentPath in EncFSLocalFileProvider 2012-03-07 23:31:32 -08:00
Mark Pariente
d38dd6015d Improve recursive copy support
Make EncFSVolume.copyPath() more robust by making it able to
recursively copy directories even with the ChainedNameIV config
option.
2012-03-04 01:59:52 -08:00
Mark Pariente
f46201577d Fix style 2012-03-04 00:06:26 -08:00
Mark Pariente
87ca7a109f Fix EncFSVolume.movePath() for ChainedNameIV
There was a bug in EncFSVolume.movePath() that caused recursive moves
in the case of ChainedNameIV configurations to fail. Also improved
rollback handling in the case of an error during the recursive move
by trying to delete the newly created directories.

Added a FileNotFoundException to EncFSLocalFileProvider.move()
implementation as well.
2012-03-03 23:54:29 -08:00
Mark Pariente
216a33901a Throw exception from EncFSLocalFileProvider.mkdir()
Made EncFSLocalFileProvider.mkdir() throw a FileNotFoundException
if one or more path elements aren't found. Also modified
EncFSVolume.makeDir to filter this exception to print the
unencrypted path in the exception message.
2012-03-03 17:33:30 -08:00
Mark Pariente
f5daf6d52a Code style, formatting and API name cleanups
This is a massive commit serving a few purposes:

 * Unify code formatting and style to conform to Eclipse formatting. We
   will use this formatting from now on for all new code to have a
   uniform codebase.

 * Clean up API naming and remove redundancies. I've renamed a lot of
   API functions to promote coherence across the codebase. I've also
   removed some redundant API's to promote best practices.

 * Improve JavaDoc coverage. This commit documents all public methods
   within the library itself.

 * Fix JavaDoc warnings.
2012-02-27 23:03:14 -08:00
aefo
9625039638 Added further tests for EncFSVolume 2012-02-22 19:28:42 +00:00
Mark Pariente
f1f22e113a Rename file provider classes
EncFSNativeFileSource -> EncFSFileProvider
EncFSLocalFileSystemNativeFileSource -> EncFSLocalFileProvider
2012-02-01 18:13:53 -08:00
Renamed from src/main/java/org/mrpdaemon/sec/encfs/EncFSLocalFileSystemNativeFileSource.java (Browse further)