Skip to content

Commit 4034f8a

Browse files
refactor(ImportExport): use _display_path for cables library save log
1 parent 5913bce commit 4034f8a

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/ImportExport.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ using ..Utils
3737
using ..Materials
3838
using ..EarthProps
3939
using ..DataModel
40-
import ..LineCableModels: add!, load!, export_data, save
40+
import ..LineCableModels: add!, load!, export_data, save, _is_headless, _display_path
4141
using ..LineCableModels # For physical constants (f₀, μ₀, ε₀, ρ₀, T₀, TOL, ΔTmax)
4242

4343
# Module-specific dependencies
@@ -48,10 +48,6 @@ using JSON3
4848
using Serialization # For .jls format
4949
import Base: get
5050

51-
function _display_path(file_name)
52-
return DataModel._is_headless() ? basename(file_name) : abspath(file_name)
53-
end
54-
5551
#=
5652
Generates sequential IDs, used for simulation element identification (e.g., PSCAD).
5753
Starts from 100,000,000 and increments.
@@ -1430,7 +1426,7 @@ function _save_cableslibrary_json(library::CablesLibrary, file_name::String)::St
14301426
JSON3.pretty(io, serialized_library, allow_inf=true)
14311427
end
14321428
if isfile(file_name)
1433-
@info "Cables library saved to: $(file_name)"
1429+
@info "Cables library saved to: $(_display_path(file_name))"
14341430
end
14351431
return abspath(file_name)
14361432
end

0 commit comments

Comments
 (0)