File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,10 @@ abstract class PartitioningAwareFileCatalog(
7777 // Make the path qualified (consistent with listLeafFiles and listLeafFilesInParallel).
7878 val fs = path.getFileSystem(hadoopConf)
7979 val qualifiedPathPre = fs.makeQualified(path)
80- val qualifiedPath : Path = if (qualifiedPathPre.getParent == null ) {
80+ val qualifiedPath : Path = if (qualifiedPathPre.isRoot && ! qualifiedPathPre.isAbsolute ) {
8181 // SPARK-17613: Always append `Path.SEPARATOR` to the end of parent directories,
82- // because the `leafFile.getParent` would have returned a path with the separator at the
83- // end.
82+ // because the `leafFile.getParent` would have returned an absolute path with the separator
83+ // at the end.
8484 new Path (qualifiedPathPre, Path .SEPARATOR )
8585 } else {
8686 qualifiedPathPre
You can’t perform that action at this time.
0 commit comments