@@ -1039,26 +1039,26 @@ define(function (require, exports, module) {
10391039 if ( dirSplit . length > 3 ) {
10401040 const rootDirName = dirSplit [ 0 ] ;
10411041 const secondLastSegment = dirSplit [ dirSplit . length - 2 ] ;
1042- const fileName = dirSplit [ dirSplit . length - 1 ] ;
1042+ const lastSeg = dirSplit [ dirSplit . length - 1 ] ;
10431043
10441044 if ( Phoenix . isNativeApp && brackets . platform === "win" ) {
1045- // Eg: C:\\long\path\to\file.txt - > C:\\...\to\file.txt
1046- truncatedPath = `${ rootDirName } :${ sep } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ fileName } ` ;
1045+ // Eg: C:\\long\path\to\fileDir - > C:\\...\to\fileDir
1046+ truncatedPath = `${ rootDirName } :${ sep } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ lastSeg } ` ;
10471047 } else if ( Phoenix . isNativeApp ) {
10481048 // an absolute path of the form /abs/path/to/file in linux/mac desktop
1049- // Eg: /application/path/to/file.txt - > /application/.../to/file.txt
1050- truncatedPath = `${ sep } ${ rootDirName } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ fileName } ` ;
1049+ // Eg: /application/path/to/fileDir - > /application/.../to/fileDir
1050+ truncatedPath = `${ sep } ${ rootDirName } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ lastSeg } ` ;
10511051 } else if ( ! Phoenix . isNativeApp && ! displayDirPath . startsWith ( '/' ) ) {
1052- // browser fs access path: `folder/file.txt ` (no-leading slash) fs access paths- /mnt/paths
1053- // Eg: opened/folder/path/to/file.txt - > opened/.../to/file.txt (no-leading slash)
1054- truncatedPath = `${ rootDirName } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ fileName } ` ;
1052+ // browser fs access path: `folder/fileDir ` (no-leading slash) fs access paths- /mnt/paths
1053+ // Eg: opened/folder/path/to/fileDir - > opened/.../to/fileDir (no-leading slash)
1054+ truncatedPath = `${ rootDirName } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ lastSeg } ` ;
10551055 } else {
10561056 //this is an internal indexed db backed virtual path. This can only happen if we allow virtual
10571057 // project locations from one project to be opened in another. So just print the trim path
10581058 // path in this case. In future, when we add this support, the get display path fn should be
10591059 // modified to give somethings like what we do for fs access path.
1060- // Eg: /application/path/to/file.txt - > /application/.../to/file.txt
1061- truncatedPath = `${ sep } ${ rootDirName } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ fileName } ` ;
1060+ // Eg: /application/path/to/fileDir - > /application/.../to/fileDir
1061+ truncatedPath = `${ sep } ${ rootDirName } ${ sep } \u2026${ sep } ${ secondLastSegment } ${ sep } ${ lastSeg } ` ;
10621062 }
10631063 }
10641064
0 commit comments