*!*****************************************************************************
*!      Procedure: nastav_exportpath
*!*****************************************************************************
*PROCEDURE nastav_exportpath

IF EMPTY(m.gcexportpath)
    gcexportpath     = get_ini(m.machine, "ExportPath")

    IF EMPTY(m.gcexportpath)
        gcexportpath = get_ini("Config", "ExportPath")
    ENDIF 

    IF .not. EMPTY(m.gcexportpath)
        backslash( @m.gcexportpath )
    ENDIF 

ENDIF
DO mk_dir WITH m.gcexportpath



#DEFINE DEFAULT_EXPORTPATH "..\tmp\"
PROCEDURE _________nastav_exportpath

IF EMPTY(m.gcexportpath)
    gcexportpath     = get_ini(m.machine, "ExportPath")
    IF EMPTY(m.gcexportpath)
        gcexportpath = GETDIR("..\", jaz("form_vyber_adr_na_exp_zostav"), "")
    ENDIF 
    IF EMPTY(m.gcexportpath)
        gcexportpath = get_ini("Config", "ExportPath")
    ENDIF 
    IF EMPTY(m.gcexportpath)
        gcexportpath = DEFAULT_EXPORTPATH
    ENDIF
    IF ! EMPTY(m.gcexportpath)

        DO WHILE .t.
            backslash( @m.gcexportpath )
            DO mk_dir WITH m.gcexportpath
            zapsano = STRTOFILE(m.gcexportpath, m.gcexportpath + "testexportpath.txt")
            ? m.zapsano
            IF  m.zapsano > 0
                EXIT 
            ENDIF 
            gcexportpath = GETDIR("..\", jaz("form_vyber_adr_na_exp_zostav"), "")

        ENDDO 
    ENDIF
ENDIF
