aboutsummaryrefslogtreecommitdiffstats
path: root/src/fcopy
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2017-04-24 08:38:56 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2017-04-24 08:38:56 -0400
commitdf8c4e9cd15bfc2c5cb4c854a8f876c02c2eb1d6 (patch)
tree1b249af7fa6bfd12a925c7568bbbc032a15daee7 /src/fcopy
parentfix totem profile for Ubuntu Gnome (diff)
downloadfirejail-df8c4e9cd15bfc2c5cb4c854a8f876c02c2eb1d6.tar.gz
firejail-df8c4e9cd15bfc2c5cb4c854a8f876c02c2eb1d6.tar.zst
firejail-df8c4e9cd15bfc2c5cb4c854a8f876c02c2eb1d6.zip
fcopy - fix trailing char
Diffstat (limited to 'src/fcopy')
-rw-r--r--src/fcopy/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fcopy/main.c b/src/fcopy/main.c
index 88379001c..b9d2c19a8 100644
--- a/src/fcopy/main.c
+++ b/src/fcopy/main.c
@@ -322,6 +322,12 @@ int main(int argc, char **argv) {
322 exit(1); 322 exit(1);
323 } 323 }
324 324
325 // trim trailing chars
326 if (src[strlen(src) - 1] == '/')
327 src[strlen(src) - 1] = '\0';
328 if (dest[strlen(dest) - 1] == '/')
329 dest[strlen(dest) - 1] = '\0';
330
325 // check the two files; remove ending / 331 // check the two files; remove ending /
326 int len = strlen(src); 332 int len = strlen(src);
327 if (src[len - 1] == '/') 333 if (src[len - 1] == '/')