@@ -105,20 +105,20 @@ private void addLink(Builder builder, String path, String target) throws NoSuchA
105
105
}
106
106
107
107
private void addFile (Builder builder , String rootPath , File file , int mode ) throws NoSuchAlgorithmException , IOException {
108
- rootPath += "/" + file .getName ();
109
- Logger .info ("Adding file '" + file + "' to RPM builder as '" + rootPath + "'" );
110
- builder .addFile (rootPath + "/" + file . getName () , file , mode );
108
+ String filePath = rootPath + "/" + file .getName ();
109
+ Logger .info ("Adding file '" + file + "' to RPM builder as '" + filePath + "'" );
110
+ builder .addFile (filePath , file , mode );
111
111
}
112
112
113
- private void addDirectory (Builder builder , String parentPath , File root , List <File > executionPermissions ) throws NoSuchAlgorithmException , IOException {
114
- String rootPath = parentPath + "/" + root .getName ();
115
- Logger .info ("Adding directory '" + root + "' to RPM builder as '" + rootPath + "'" );
116
- builder .addDirectory (rootPath );
117
- for (File f : root .listFiles ()) {
113
+ private void addDirectory (Builder builder , String parentPath , File directory , List <File > executionPermissions ) throws NoSuchAlgorithmException , IOException {
114
+ String dirPath = parentPath + "/" + directory .getName ();
115
+ Logger .info ("Adding directory '" + directory + "' to RPM builder as '" + dirPath + "'" );
116
+ builder .addDirectory (dirPath );
117
+ for (File f : directory .listFiles ()) {
118
118
if (f .isDirectory ())
119
- addDirectory (builder , rootPath , f , executionPermissions );
119
+ addDirectory (builder , dirPath , f , executionPermissions );
120
120
else {
121
- addFile (builder , rootPath , f , executionPermissions .contains (f ) ? 0755 : 0644 );
121
+ addFile (builder , dirPath , f , executionPermissions .contains (f ) ? 0755 : 0644 );
122
122
}
123
123
}
124
124
}
0 commit comments