File tree 4 files changed +8
-1
lines changed
lib-extra/src/main/java/com/diffplug/spotless/extra
4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ This document is intended for Spotless developers.
10
10
We adhere to the [ keepachangelog] ( https://keepachangelog.com/en/1.0.0/ ) format (starting after version ` 1.27.0 ` ).
11
11
12
12
## [ Unreleased]
13
+ ### Fixed
14
+ * Fixed a bug which occurred if the root directory of the project was also the filesystem root ([ #732 ] ( https://github.com/diffplug/spotless/pull/732 ) )
13
15
14
16
## [ 2.10.1] - 2020-11-13
15
17
### Fixed
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ static class CachedEndings implements Serializable {
108
108
final ConcurrentRadixTree <String > hasNonDefaultEnding = new ConcurrentRadixTree <>(new DefaultCharSequenceNodeFactory ());
109
109
110
110
CachedEndings (File projectDir , Runtime runtime , Iterable <File > toFormat ) {
111
- rootDir = FileSignature .pathNativeToUnix (projectDir .getAbsolutePath ()) + "/" ;
111
+ String rootPath = FileSignature .pathNativeToUnix (projectDir .getAbsolutePath ());
112
+ rootDir = rootPath .equals ("/" ) ? rootPath : rootPath + "/" ;
112
113
defaultEnding = runtime .defaultEnding ;
113
114
for (File file : toFormat ) {
114
115
String ending = runtime .getEndingFor (file );
Original file line number Diff line number Diff line change 3
3
We adhere to the [ keepachangelog] ( https://keepachangelog.com/en/1.0.0/ ) format (starting after version ` 3.27.0 ` ).
4
4
5
5
## [ Unreleased]
6
+ ### Fixed
7
+ * Fixed a bug which occurred if the root directory of the project was also the filesystem root ([ #732 ] ( https://github.com/diffplug/spotless/pull/732 ) )
6
8
7
9
## [ 5.8.1] - 2020-11-13
8
10
### Fixed
Original file line number Diff line number Diff line change 3
3
We adhere to the [ keepachangelog] ( https://keepachangelog.com/en/1.0.0/ ) format (starting after version ` 1.27.0 ` ).
4
4
5
5
## [ Unreleased]
6
+ ### Fixed
7
+ * Fixed a bug which occurred if the root directory of the project was also the filesystem root ([ #732 ] ( https://github.com/diffplug/spotless/pull/732 ) )
6
8
7
9
## [ 2.6.0] - 2020-11-13
8
10
### Added
You can’t perform that action at this time.
0 commit comments