@@ -1388,7 +1388,7 @@ class NamespaceFS {
1388
1388
dbg . log1 ( 'NamespaceFS._finish_upload:' , open_mode , file_path , upload_path , fs_xattr ) ;
1389
1389
1390
1390
if ( ! same_inode && ! part_upload ) {
1391
- await this . _move_to_dest ( fs_context , upload_path , file_path , target_file , open_mode , params . key ) ;
1391
+ await this . _move_to_dest ( fs_context , upload_path , file_path , target_file , open_mode , params . key , is_dir_content ) ;
1392
1392
}
1393
1393
1394
1394
// when object is a dir, xattr are set on the folder itself and the content is in .folder file
@@ -1421,13 +1421,16 @@ class NamespaceFS {
1421
1421
}
1422
1422
1423
1423
// move to dest GPFS (wt) / POSIX (w / undefined) - non part upload
1424
- async _move_to_dest ( fs_context , source_path , dest_path , target_file , open_mode , key ) {
1424
+ async _move_to_dest ( fs_context , source_path , dest_path , target_file , open_mode , key , is_dir_content ) {
1425
+ dbg . log2 ( '_move_to_dest' , fs_context , source_path , dest_path , target_file , open_mode , key , is_dir_content ) ;
1425
1426
let retries = config . NSFS_RENAME_RETRIES ;
1426
1427
// will retry renaming a file in case of parallel deleting of the destination path
1427
1428
for ( ; ; ) {
1428
1429
try {
1429
1430
await native_fs_utils . _make_path_dirs ( dest_path , fs_context ) ;
1430
- if ( this . _is_versioning_disabled ( ) ) {
1431
+ if ( this . _is_versioning_disabled ( ) ||
1432
+ ( this . _is_versioning_enabled ( ) && is_dir_content ) ) {
1433
+ // dir_content is not supported in versioning, hence we will treat it like versioning disabled
1431
1434
if ( open_mode === 'wt' ) {
1432
1435
await target_file . linkfileat ( fs_context , dest_path ) ;
1433
1436
} else {
0 commit comments