Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
306f85ac
Commit
306f85ac
authored
20 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
If the first char of the path passed to _fullpath is ~, expand to the current value of $HOME
parent
13902aad
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/xpdev/csv_file.dsp
+96
-96
96 additions, 96 deletions
src/xpdev/csv_file.dsp
src/xpdev/dirwrap.c
+20
-8
20 additions, 8 deletions
src/xpdev/dirwrap.c
src/xpdev/xpdev.dsp
+112
-112
112 additions, 112 deletions
src/xpdev/xpdev.dsp
src/xpdev/xpdev_mt.dsp
+124
-124
124 additions, 124 deletions
src/xpdev/xpdev_mt.dsp
with
352 additions
and
340 deletions
src/xpdev/csv_file.dsp
+
96
−
96
View file @
306f85ac
This diff is collapsed.
Click to expand it.
src/xpdev/dirwrap.c
+
20
−
8
View file @
306f85ac
...
@@ -761,14 +761,26 @@ char * DLLCALL _fullpath(char *target, const char *path, size_t size) {
...
@@ -761,14 +761,26 @@ char * DLLCALL _fullpath(char *target, const char *path, size_t size) {
*
out
=
0
;
*
out
=
0
;
if
(
*
path
!=
'/'
)
{
if
(
*
path
!=
'/'
)
{
p
=
getcwd
(
target
,
size
);
if
(
*
path
==
'~'
)
{
p
=
getenv
(
"HOME"
);
if
(
p
==
NULL
||
strlen
(
p
)
+
strlen
(
path
)
>=
size
)
if
(
p
==
NULL
||
strlen
(
p
)
+
strlen
(
path
)
>=
size
)
return
(
NULL
);
return
(
NULL
);
strcpy
(
target
,
p
);
out
=
strrchr
(
target
,
'\0'
);
path
++
;
}
else
{
p
=
getcwd
(
NULL
,
size
);
if
(
p
==
NULL
||
strlen
(
p
)
+
strlen
(
path
)
>=
size
)
return
(
NULL
);
strcpy
(
target
,
p
);
free
(
p
);
out
=
strrchr
(
target
,
'\0'
);
out
=
strrchr
(
target
,
'\0'
);
*
(
out
++
)
=
'/'
;
*
(
out
++
)
=
'/'
;
*
out
=
0
;
*
out
=
0
;
out
--
;
out
--
;
}
}
}
strncat
(
target
,
path
,
size
-
1
);
strncat
(
target
,
path
,
size
-
1
);
/* if(stat(target,&sb))
/* if(stat(target,&sb))
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/xpdev.dsp
+
112
−
112
View file @
306f85ac
This diff is collapsed.
Click to expand it.
src/xpdev/xpdev_mt.dsp
+
124
−
124
View file @
306f85ac
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment